/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * supervision_rh_asistencia_xdia.java
 *
 * Created on 29/06/2011, 02:27:38 PM
 */

package sie_invdis;



import java.awt.print.PrinterException;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;

import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTable.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Date;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.text.*;
import javax.swing.JFrame;
import javax.swing.table.*;
import java.io.*;

/**
 *
 * @author Michelle
 */
public class supervision_rh_asistencia_xdia extends javax.swing.JFrame {


      private javax.swing.table.DefaultTableModel jtable_modelo;
      private javax.swing.table.DefaultTableModel jtable_modelo_asistenciaxdia;
      private javax.swing.table.DefaultTableModel jtable_modelo_asistenciaxdiahe;
      private javax.swing.table.DefaultTableModel jtable_modelo_asistenciaxdia_detalle;
      private javax.swing.table.DefaultTableModel jtable_modelo_asistenciaxdia_resxsta;
      private javax.swing.table.DefaultTableModel jtable_modelo_detalleprenomina;
      private javax.swing.table.DefaultTableModel jtable_modelo_periodo;
      private javax.swing.table.DefaultTableModel jtable_modelo_reportef;
      private javax.swing.table.DefaultTableModel jtable_modelo_he_detalle;
      private javax.swing.table.DefaultTableModel jtable_modelo_eventos;

      private javax.swing.table.DefaultTableModel jtable_modelo_prenomina;
      private javax.swing.table.DefaultTableModel jtable_modelo_reportef2;

      private javax.swing.table.DefaultTableModel jtable_modelo_empleado;
      private javax.swing.table.DefaultTableModel jtable_modelo_empleadoe;
      private javax.swing.table.DefaultTableModel jtable_modelo_hecattipo;
      private javax.swing.table.DefaultTableModel jtable_modelo_insidencias;
      private DefaultListModel modelo ;

      JTable table;
      private java.util.Date fechahoy=new Date();
      bd_conexion x = new bd_conexion();
      ResultSet rs = null,rs2 = null;

      private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");
      private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");

    private SimpleDateFormat formateadorht = new SimpleDateFormat("dd-MM-yyyy HH:mm");

      private DecimalFormat miforma = new DecimalFormat("###,###,###");
      private int columnavisualisa=1,opcionupdate=0,indexactual=0,yacargueasixdia=1,yacargueasidetaxdia=1,yacargueresxstatus=1,controlcombodetpa=0,controlcambio=4,comboa=0,yacarguepuntual=0,ordenpun=0,yacargue4=0,hedet=0,indice=0,carga=0,yacargue5=0;
      private String textobuscadepa="0";

    /** Creates new form supervision_rh_asistencia_xdia */
    public supervision_rh_asistencia_xdia()
        {
         this.iniciar_modelo_de_tabla();
         this.iniciar_modelo_asistencia();
         this.iniciar_modelo_asistencia_detalle();
         this.iniciar_modelo_resumenxstatus();
         this.iniciar_modelo_tareasrol();
         this.iniciar_modelo_prenomina();
         this.iniciar_modelo_detalleprenomina();
         this.iniciar_modelo_periodos();
         this.iniciar_modelo_reportenof1();
         this.iniciar_modelo_reportef2();
         this.iniciar_modelo_empleado();
         this.iniciar_modelo_he_detalle();
         this.iniciar_modelo_eventos();
         this.iniciar_modelo_empleadoeve();
         this.iniciar_modelo_hetipcatalogo();
         this.iniciar_modelo_insidencias();
        initComponents();
        Calendar fechainisem = Calendar.getInstance(); // obtiene la fecha actual
        int diadesemana=fechainisem.get(Calendar.DAY_OF_WEEK)-2;
        System.out.println(diadesemana);
        fechainisem.add(Calendar.DATE, -diadesemana); // incrementa en 30 días la fecha actual.
        this.jdc_fechainicial.setDate(fechainisem.getTime());
        this.jdc_fechafinal.setDate(fechahoy);
        this.jdc_fechainicial1.setDate(fechahoy);
        this.jdc_fechafinal1.setDate(fechahoy);
        this.jdc_fechainicial3.setDate(fechahoy);

        this.jdc_fechainicial2.setDate(fechahoy);
        this.jdc_fechafinal2.setDate(fechahoy);



        jtb_asitencia.getColumnModel().getColumn(0).setPreferredWidth(40);//Cliente
        jtb_asitencia.getColumnModel().getColumn(1).setPreferredWidth(120);//piezas
        
        jt_historialasistencia_detalle.getColumnModel().getColumn(0).setPreferredWidth(30);//Cliente
        jt_historialasistencia_detalle.getColumnModel().getColumn(1).setPreferredWidth(40);//piezas
        jt_historialasistencia_detalle.getColumnModel().getColumn(2).setPreferredWidth(25);//piezas
        jt_historialasistencia_detalle.getColumnModel().getColumn(3).setPreferredWidth(25);//Cliente
        jt_historialasistencia_detalle.getColumnModel().getColumn(4).setPreferredWidth(80);//piezas
        jt_historialasistencia_detalle.getColumnModel().getColumn(5).setPreferredWidth(60);//piezas

        jt_catprenominas.getColumnModel().getColumn(0).setPreferredWidth(70);//tem ent
        jt_catprenominas.getColumnModel().getColumn(1).setPreferredWidth(40);//familia
        jt_catprenominas.getColumnModel().getColumn(2).setPreferredWidth(50);//tem ent
        jt_catprenominas.getColumnModel().getColumn(3).setPreferredWidth(80);//familia
        jt_catprenominas.getColumnModel().getColumn(4).setPreferredWidth(80);//tem ent
        jt_catprenominas.getColumnModel().getColumn(5).setPreferredWidth(100);//familia

        jt_historialasistencia_detalle3.getColumnModel().getColumn(0).setPreferredWidth(40);//tem ent
        jt_historialasistencia_detalle3.getColumnModel().getColumn(1).setPreferredWidth(60);//familia
        jt_historialasistencia_detalle3.getColumnModel().getColumn(2).setPreferredWidth(140);//tem ent
        jt_historialasistencia_detalle3.getColumnModel().getColumn(3).setPreferredWidth(20);//familia
        jt_historialasistencia_detalle3.getColumnModel().getColumn(4).setPreferredWidth(200);//tem ent

        jt_catempleados.getColumnModel().getColumn(0).setPreferredWidth(30);//tem ent
        jt_catempleados.getColumnModel().getColumn(1).setPreferredWidth(80);//familia
        jt_catempleados.getColumnModel().getColumn(2).setPreferredWidth(60);//tem ent


        jt_resumenxstatus1.getColumnModel().getColumn(0).setPreferredWidth(10);//Id
        jt_resumenxstatus1.getColumnModel().getColumn(1).setPreferredWidth(160);//nombre
        jt_resumenxstatus1.getColumnModel().getColumn(2).setPreferredWidth(100);//Departamento
        jt_resumenxstatus1.getColumnModel().getColumn(3).setPreferredWidth(100);//puesto
        jt_resumenxstatus1.getColumnModel().getColumn(4).setPreferredWidth(55);//puntualida
        jt_resumenxstatus1.getColumnModel().getColumn(5).setPreferredWidth(30);//Retardo
        jt_resumenxstatus1.getColumnModel().getColumn(6).setPreferredWidth(30);//Ret. mayor
        jt_resumenxstatus1.getColumnModel().getColumn(7).setPreferredWidth(30);//Ret. mayor
        jt_resumenxstatus1.getColumnModel().getColumn(8).setPreferredWidth(30);//Ret. mayor
        jt_resumenxstatus1.getColumnModel().getColumn(9).setPreferredWidth(30);//Ret. mayor
        jt_resumenxstatus1.getColumnModel().getColumn(10).setPreferredWidth(60);//Ret. mayor

        jt_historialasistencia_detalle1.getColumnModel().getColumn(0).setPreferredWidth(120);//tem ent
        jt_historialasistencia_detalle1.getColumnModel().getColumn(1).setPreferredWidth(50);//familia
        jt_historialasistencia_detalle1.getColumnModel().getColumn(2).setPreferredWidth(120);//tem ent
        jt_historialasistencia_detalle1.getColumnModel().getColumn(3).setPreferredWidth(20);//familia
        jt_historialasistencia_detalle1.getColumnModel().getColumn(4).setPreferredWidth(20);//tem ent
        jt_historialasistencia_detalle1.getColumnModel().getColumn(5).setPreferredWidth(20);//familia
        jt_historialasistencia_detalle1.getColumnModel().getColumn(6).setPreferredWidth(20);//familia

        jt_catempleados2.getColumnModel().getColumn(0).setPreferredWidth(50);//tem ent
        jt_catempleados2.getColumnModel().getColumn(1).setPreferredWidth(80);//familia
        jt_catempleados2.getColumnModel().getColumn(2).setPreferredWidth(80);//tem ent
        jt_catempleados2.getColumnModel().getColumn(3).setPreferredWidth(45);//familia
        jt_catempleados2.getColumnModel().getColumn(4).setPreferredWidth(45);//tem ent
        jt_catempleados2.getColumnModel().getColumn(5).setPreferredWidth(80);//familia
        jt_catempleados2.getColumnModel().getColumn(6).setPreferredWidth(60);//familia



        jtb_asitencia.getTableHeader().setBackground(Color.yellow);
        this.buttonGroup2.setSelected(jrbtn_empleado.getModel(), true);
        //jtb_asitencia.setAutoCreateColumnsFromModel(false);
        this.buttonGroup1.setSelected(jrbtn_hoy.getModel(), true);

        this.buttonGroup3.setSelected(jrbtn_ordenmrm.getModel(), true);

        this.jbtn_generareporte.requestFocus();
        if (variables_global.getnivelusu()==3)
            {
                textobuscadepa=String.valueOf(variables_global.getdepartamento());
                this.jcmbx_departamento.addItem(variables_global.getdepartamento()+":"+variables_global.getdepartamento_des());
                this.jftf_asist_horaentrada.setEditable(false);
                this.jftf_asist_horasalida.setEditable(false);
                controlcambio=4;
            }
      if (variables_global.getnivelusu()<3)
            {
                this.jftf_asist_horaentrada.setEditable(true);
                this.jftf_asist_horasalida.setEditable(true);
                controlcambio=6;
            }
    if (variables_global.getnivelusu()==7)
            {
            this.jbtn_asist_guardarcambios.setVisible(false);
            this.jbtn_asistenciarev.setVisible(false);
            //this.jbtn_detalleempleado.setVisible(false);
            this.jbtn_asistenciarev1.setVisible(false);
   
        }
   
        yacargueasixdia=0;
        yacargueasidetaxdia=0;
        yacargueresxstatus=0;

        this.loadcombodepa();
        controlcombodetpa=1;

        this.carga_datos_periodos();
        this.loadcombo_patronclasif();
        comboa=1;

        this.carga_datos_hetiposcat();
        this.loadcombo_interlineado();
        this.jLabel49.setVisible(false);
        this.jftf_asist_horaentrada1.setVisible(false);
        carga=1;
        this.loadcomboasist_statusin();
    }


private void iniciar_modelo_de_tabla()
    {
        jtable_modelo=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo.addColumn("<html><b>Depto.</b></html>");
        jtable_modelo.addColumn("<html><b>Nombre/Fecha</b></html>");
    }
private void iniciar_modelo_reportenof1()
    {
        jtable_modelo_reportef=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_reportef.addColumn("<html><b>Nombre</b></html>"); //0
        jtable_modelo_reportef.addColumn("<html><b>F.Ing.Trab.</b></html>"); //1
        jtable_modelo_reportef.addColumn("<html><b>Sueldo</b></html>");//2
        jtable_modelo_reportef.addColumn("<html><b>Hrs Extras</b></html>");//3
        jtable_modelo_reportef.addColumn("<html><b>Bono Apoyo</b></html>");//4
        jtable_modelo_reportef.addColumn("<html><b>Descanso Trab..</b></html>");//5
        jtable_modelo_reportef.addColumn("<html><b>Dia Festivo</b></html>");//6
        jtable_modelo_reportef.addColumn("<html><b>Prima Dom.</b></html>");//6
        jtable_modelo_reportef.addColumn("<html><b>Total.</b></html>");//7
        jtable_modelo_reportef.addColumn("<html><b>Firmas.</b></html>");//8

    }
  private void iniciar_modelo_reportef2()
    {
        jtable_modelo_reportef2=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_reportef2.addColumn("<html><b>Nombre</b></html>"); //0
        jtable_modelo_reportef2.addColumn("<html><b>Curp/Rfc</b></html>");//1
        jtable_modelo_reportef2.addColumn("<html><b>Dura cion Jornada</b></html>"); //2
        jtable_modelo_reportef2.addColumn("<html><b>F.Ing.Trab.</b></html>"); //3
        jtable_modelo_reportef2.addColumn("<html><b>T. sala rio.</b></html>"); //4
        jtable_modelo_reportef2.addColumn("<html><b>Dias</b></html>"); //5
        jtable_modelo_reportef2.addColumn("<html><b>Sal. Base Cotizac</b></html>");//6
        jtable_modelo_reportef2.addColumn("<html><b>Sal. Nom</b></html>");//6
        jtable_modelo_reportef2.addColumn("<html><b>Sueldo</b></html>");//7
        jtable_modelo_reportef2.addColumn("<html><b>Vales Des pensa.</b></html>");//8
        jtable_modelo_reportef2.addColumn("<html><b>Prima Dom.</b></html>");//9
        jtable_modelo_reportef2.addColumn("<html><b>Subtotal</b></html>");//10
        jtable_modelo_reportef2.addColumn("<html><b>Sub sidio al Emp.</b></html>");//11
        jtable_modelo_reportef2.addColumn("<html><b>Total Percep cion</b></html>");//12
        jtable_modelo_reportef2.addColumn("<html><b>ISR Sueldos</b></html>");//13
        jtable_modelo_reportef2.addColumn("<html><b>IMSS</b></html>");//14
        jtable_modelo_reportef2.addColumn("<html><b>Info navit</b></html>");//15
        jtable_modelo_reportef2.addColumn("<html><b>Total De duc.</b></html>");//16
        jtable_modelo_reportef2.addColumn("<html><b>Neto a Pagar.</b></html>");//17
        jtable_modelo_reportef2.addColumn("<html><b>Firmas.</b></html>");//18

    }
  private void iniciar_modelo_empleado()
    {
        jtable_modelo_empleado=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_empleado.addColumn("<html><b>Id</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Nombre</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Area</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Puesto</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>F.Ingreso</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>C.Puntualidad</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Retardo</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Ret.Mayor</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>No Evaluado</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Ret.Justifca</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Total</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Status E.</b></html>");
    }
private void iniciar_modelo_empleadoeve()
    {
        jtable_modelo_empleadoe=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_empleadoe.addColumn("<html><b>Puesto</b></html>");
        jtable_modelo_empleadoe.addColumn("<html><b>Nombre</b></html>");
        jtable_modelo_empleadoe.addColumn("<html><b>Area</b></html>");

    }
private void iniciar_modelo_insidencias()
    {
        jtable_modelo_insidencias=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_insidencias.addColumn("<html><b>Fecha</b></html>");
        jtable_modelo_insidencias.addColumn("<html><b>Plaza</b></html>");
        jtable_modelo_insidencias.addColumn("<html><b>Nombre</b></html>");
        jtable_modelo_insidencias.addColumn("<html><b>fecha Ini.</b></html>");
        jtable_modelo_insidencias.addColumn("<html><b>fecha Fin</b></html>");
        jtable_modelo_insidencias.addColumn("<html><b>Describe Insidencia</b></html>");
        jtable_modelo_insidencias.addColumn("<html><b>Opero</b></html>");

    }
private void iniciar_modelo_hetipcatalogo()
    {
        jtable_modelo_hecattipo=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_hecattipo.addColumn("<html><b>Id</b></html>");
        jtable_modelo_hecattipo.addColumn("<html><b>Nombre</b></html>");
    }

 private void iniciar_modelo_columnas(Date fechaInicial, Date fechaFinal)
    {
     String titulo="";
     int columnas =0,i=0,j=0;
     columnas=this.jt_historialasistencia.getColumnModel().getColumnCount();
     System.out.println("columnas"+columnas);
  
     int candias=0;
        try
            {
              rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_asistencia_fechas(1,'"+this.fechaamericana(fechaInicial)+"','"+this.fechaamericana(fechaFinal)+"');",variables_global.getconexiongral());
               while (rs.next())
                    {
                      candias=rs.getInt(1)+3;
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
     //System.out.println("revision de columnas"+columnas+" diferencia fechas"+candias);
     for(j=columnas;j<candias;j++)
                {
                  //  this.Removecolumna(jtb_asitencia, columnas-j);
                      jtable_modelo_asistenciaxdia.addColumn(j);
                      jtable_modelo_asistenciaxdiahe.addColumn(j);
                      System.out.println("Agrego ahora hay"+j+"="+this.jtb_asitencia.getColumnModel().getColumnCount());
                }
     //jtable_modelo_asistenciaxdiahe.addColumn("Totales");
     Calendar fechaini = Calendar.getInstance(); // obtiene la fecha actual
      for(i=2;i<candias;i++)
                {
                    //fechaini.set(fechaInicial.getYear()+1900,fechaInicial.getMonth(),fechaInicial.getDate()+(i-2));
                    //System.out.println("esto vale i"+i+"estovale dias"+candias);
                  try
                    {
                      rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_asistencia_fechassig(1,'"+this.fechaamericana(fechaInicial)+"','"+this.fechaamericana(fechaFinal)+"',"+(i-2)+");",variables_global.getconexiongral());
                       while (rs.next())
                            {
                              titulo=this.fechaeuropea(rs.getString(1));
                            }
                    }
                    catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }
                    //titulo=this.fechaeuropea(fechaini.getTime());
                    jt_historialasistencia.getColumnModel().getColumn(i).setHeaderValue(titulo+" "+this.DiaSemana(this.fechaamericana(titulo)).substring(0, 2));
                    jt_historialasistencia1.getColumnModel().getColumn(i).setHeaderValue(titulo+" "+this.DiaSemana(this.fechaamericana(titulo)).substring(0, 2));
                }
                //jtb_asitencia.repaint();
                
    }
 private void iniciar_modelo_columnasasideta(Date fechaInicial, Date fechaFinal)
    {
     String titulo="";
     int columnas =0,i=0,j=0;
     //columnas=this.jtb_asitencia.getColumnModel().getColumnCount();
     columnas=this.jtable_modelo.getColumnCount();
     //System.out.println("columnas"+columnas);
      int candias=0;
        try
            {
              rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_asistencia_fechas(1,'"+this.fechaamericana(fechaInicial)+"','"+this.fechaamericana(fechaFinal)+"');",variables_global.getconexiongral());
               while (rs.next())
                    {
                      candias=rs.getInt(1)+3;
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
     //System.out.println("revision de columnas"+columnas+" diferencia fechas"+candias);
     for(j=columnas;j<candias;j++)
                {
                  //  this.Removecolumna(jtb_asitencia, columnas-j);
                      jtable_modelo.addColumn(j);
                      System.out.println("Agrego ahora hay"+j+"="+this.jtb_asitencia.getColumnModel().getColumnCount());
                }
     Calendar fechaini = Calendar.getInstance(); // obtiene la fecha actual
      for(i=2;i<candias;i++)
                {
                    //fechaini.set(fechaInicial.getYear()+1900,fechaInicial.getMonth(),fechaInicial.getDate()+(i-2));
                    //System.out.println("esto vale i"+i+"estovale dias"+candias);
                    //titulo=this.fechaeuropea(fechaini.getTime());
                    try
                    {
                      rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_asistencia_fechassig(1,'"+this.fechaamericana(fechaInicial)+"','"+this.fechaamericana(fechaFinal)+"',"+(i-2)+");",variables_global.getconexiongral());
                       while (rs.next())
                            {
                              titulo=this.fechaeuropea(rs.getString(1));
                            }
                    }
                    catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }
                    //titulo=this.fechaeuropea(fechaini.getTime());
                    jtb_asitencia.getColumnModel().getColumn(i).setHeaderValue(titulo);

                }
    }

 private void iniciar_modelo_asistencia()
    {
        jtable_modelo_asistenciaxdia=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_asistenciaxdia.addColumn("<html><b>Departamento</b></html>");
        jtable_modelo_asistenciaxdia.addColumn("<html><b>Nombre</b></html>");

        jtable_modelo_asistenciaxdiahe=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_asistenciaxdiahe.addColumn("<html><b>Departamento</b></html>");
        jtable_modelo_asistenciaxdiahe.addColumn("<html><b>Nombre</b></html>");
    }
 private void iniciar_modelo_asistencia_detalle()
    {
        jtable_modelo_asistenciaxdia_detalle=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_asistenciaxdia_detalle.addColumn("<html><b>Tipo</b></html>");
        jtable_modelo_asistenciaxdia_detalle.addColumn("<html><b>Status</b></html>");
        jtable_modelo_asistenciaxdia_detalle.addColumn("<html><b>Hora E.</b></html>");
        jtable_modelo_asistenciaxdia_detalle.addColumn("<html><b>Hora S.</b></html>");
        jtable_modelo_asistenciaxdia_detalle.addColumn("<html><b>Observaciones</b></html>");
        jtable_modelo_asistenciaxdia_detalle.addColumn("<html><b>Hubicacion</b></html>");
    }
private void iniciar_modelo_resumenxstatus()
    {
        jtable_modelo_asistenciaxdia_resxsta=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_asistenciaxdia_resxsta.addColumn("<html><b>Depto.</b></html>");
        jtable_modelo_asistenciaxdia_resxsta.addColumn("<html><b>Nombre/Status</b></html>");
        try
            {
              rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_asistencia_status() as (id smallint,descrip text,observacion text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      jtable_modelo_asistenciaxdia_resxsta.addColumn("<html><b>"+rs.getString("id")+":"+rs.getString("observacion")+"</b></html>");
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }

    }

private void iniciar_modelo_prenomina()
    {
        jtable_modelo_prenomina=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_prenomina.addColumn("<html><b>F.Docto</b></html>");
        jtable_modelo_prenomina.addColumn("<html><b>Status</b></html>");
        jtable_modelo_prenomina.addColumn("<html><b>Dep.</b></html>");
        jtable_modelo_prenomina.addColumn("<html><b>Empleados</b></html>");
        jtable_modelo_prenomina.addColumn("<html><b>Periodo</b></html>");
        jtable_modelo_prenomina.addColumn("<html><b>Elaboro.</b></html>");
        jtable_modelo_prenomina.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo_prenomina.addColumn("<html><b>Observaciones</b></html>");
    }

private void iniciar_modelo_detalleprenomina()
    {

        jtable_modelo_detalleprenomina=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_detalleprenomina.addColumn("<html><b>Departamento</b></html>");
        jtable_modelo_detalleprenomina.addColumn("<html><b>Id</b></html>");
        jtable_modelo_detalleprenomina.addColumn("<html><b>Nombre</b></html>");
        jtable_modelo_detalleprenomina.addColumn("<html><b>Pago</b></html>");
        try
            {
              rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_prenomina_percepodeduc() as (id smallint,descrip text,tipopod smallint,observacion text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      jtable_modelo_detalleprenomina.addColumn("<html><b>"+rs.getString("id")+":"+rs.getString("descrip")+"</b></html>");
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
        jtable_modelo_detalleprenomina.addColumn("<html><b>Observacion</b></html>");
    }

private void iniciar_modelo_periodos()
    {
        jtable_modelo_periodo=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_periodo.addColumn("<html><b>Id</b></html>");
        jtable_modelo_periodo.addColumn("<html><b>Nombre</b></html>");
        jtable_modelo_periodo.addColumn("<html><b>fecha Ini</b></html>");
        jtable_modelo_periodo.addColumn("<html><b>fecha Fin</b></html>");
        jtable_modelo_periodo.addColumn("<html><b>Obs</b></html>");
        jtable_modelo_periodo.addColumn("<html><b>Dias</b></html>");
        jtable_modelo_periodo.addColumn("<html><b>fecha I. Insidencias</b></html>");
        jtable_modelo_periodo.addColumn("<html><b>fecha F. Insidencias</b></html>");

    }
private void iniciar_modelo_he_detalle()
    {
        jtable_modelo_he_detalle=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_he_detalle.addColumn("<html><b>Tipo</b></html>");
        jtable_modelo_he_detalle.addColumn("<html><b>fecha</b></html>");
        jtable_modelo_he_detalle.addColumn("<html><b>Observaciones</b></html>");
        jtable_modelo_he_detalle.addColumn("<html><b>Cant.R</b></html>");
        jtable_modelo_he_detalle.addColumn("<html><b>Cant.Aut</b></html>");
        jtable_modelo_he_detalle.addColumn("<html><b>T.Real</b></html>");
        jtable_modelo_he_detalle.addColumn("<html><b>T.Ref</b></html>");
    }
private void iniciar_modelo_eventos()
    {
        jtable_modelo_eventos=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_eventos.addColumn("<html><b>Depto</b></html>");
        jtable_modelo_eventos.addColumn("<html><b>Tipo</b></html>");
        jtable_modelo_eventos.addColumn("<html><b>Nombre</b></html>");
        jtable_modelo_eventos.addColumn("<html><b>Hora</b></html>");
        jtable_modelo_eventos.addColumn("<html><b>Justificacion</b></html>");
    }
    private void carga_datos_periodos()
     {
            while(jtable_modelo_periodo.getRowCount()>0)jtable_modelo_periodo.removeRow(0);
            try
            {
              rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_prenomina_periodos(4,'','','') as (id smallint,descrip text,obser text,fechai date,fechaf date,dias integer,fini_insi date,ffin_insi date);",variables_global.getconexiongral());
               while (rs.next())
                    {
                       jtable_modelo_periodo.addRow(new Object[]{rs.getString("id"),rs.getString("descrip"),this.fechaeuropea(rs.getString("fechai")),this.fechaeuropea(rs.getString("fechaf")),rs.getString("dias"),rs.getString("obser"),this.fechaeuropea(rs.getString("fini_insi")),this.fechaeuropea(rs.getString("ffin_insi"))});


                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }

 private void loadcomboasist_status(){
            try
            {
              rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_asistencia_statusv2(1,'','','','') as (id smallint,descrip text,observacion text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcmbx_asist_status.addItem(rs.getString("id")+":"+rs.getString("descrip")+"("+rs.getString("observacion")+")");
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
  private void loadcomboasist_statusin(){
            try
            {
              rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_asistencia_statusv2(2,'','','','') as (id smallint,descrip text,observacion text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcmbx_asist_status1.addItem(rs.getString("id")+":"+rs.getString("descrip")+"("+rs.getString("observacion")+")");
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
 private void loadcombodepa(){
 this.jcmbx_departamento.addItem("0:GENERAL");
           try
            {
               rs = x.sieuno_executediversosv2("select * from x1_supervision_tareas_departamentos() as (id smallint,descrip character varying(80));",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcmbx_departamento.addItem(rs.getString("id")+":"+rs.getString("descrip"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
 private void iniciar_modelo_tareasrol()
    {
        modelo = new javax.swing.DefaultListModel();
        try
            {
               rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_tareas(1,'','','') as (idtar smallint,descrip text,obser text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                          modelo.addElement(rs.getString("idtar")+":"+rs.getString("descrip"));
                    }
            }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
private void loadcombo_patronclasif(){

          this.jcmbx_idpatronclasif1.addItem("0:GENERAL");
           try
            {
            rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_areas(1,'','','','') as (id smallint,nombre text);",variables_global.getconexiongral());
               while (rs.next())
                    {

                      this.jcmbx_idpatronclasif1.addItem(rs.getString("id")+":"+rs.getString("nombre"));
                   }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
private void carga_datos_hetiposcat()
    {


         try
            {
            rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_hrextratipos(1,'','','','') as (id smallint,nombre text,obs text);",variables_global.getconexiongral());
               while (rs.next())
                    {

                      jtable_modelo_hecattipo.addRow(new Object[]{rs.getString("id"),rs.getString("nombre")});
                   }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
 

public void Removecolumna(JTable table, int col_index){
  TableColumn tcol = table.getColumnModel().getColumn(col_index);
  table.removeColumn(tcol);
  }

private int findcolumna (String titulo)  {
  int columnas =jtb_asitencia.getColumnModel().getColumnCount(),columencontrado=0;
  String columtitulo="";
      for(int j = 0 ;j < columnas ; j++)
                {
                    //columtitulo=jtable_modelo.getColumnName(j);
                    columtitulo=jtb_asitencia.getColumnModel().getColumn(j).getHeaderValue().toString().substring(0, 10);
                     //System.out.println(titulo+" "+columtitulo+" "+columencontrado);
                    if(columtitulo.equals(titulo))
                        {
                            columencontrado=j;
                            
                        }
                }
    return columencontrado;
}
private int findcolumna_xma (String titulo)  {
  int columnas =jt_historialasistencia.getColumnModel().getColumnCount(),columencontrado=0;
  String columtitulo="";
      for(int j = 0 ;j < columnas ; j++)
                {
                    //columtitulo=jtable_modelo.getColumnName(j);
                    columtitulo=jt_historialasistencia.getColumnModel().getColumn(j).getHeaderValue().toString().substring(0, 10);
                     //System.out.println(titulo+" "+columtitulo+" "+columencontrado);
                    if(columtitulo.equals(titulo))
                        {
                            columencontrado=j;

                        }
                }
    return columencontrado;
}
private int findcolumna_xmahe (String titulo)  {
  int columnas =jt_historialasistencia1.getColumnModel().getColumnCount(),columencontrado=0;
  String columtitulo="";
      for(int j = 0 ;j < columnas ; j++)
                {
                    //columtitulo=jtable_modelo.getColumnName(j);
                    columtitulo=jt_historialasistencia1.getColumnModel().getColumn(j).getHeaderValue().toString().substring(0, 10);
                     //System.out.println(titulo+" "+columtitulo+" "+columencontrado);
                    if(columtitulo.equals(titulo))
                        {
                            columencontrado=j;

                        }
                }
    return columencontrado;
}

private int findcolumna_status (String titulo)  {
  int columnas =jtable_modelo_asistenciaxdia_resxsta.getColumnCount(),columencontrado=0;
  String columtitulo[]=null;
      for(int j = 0 ;j < columnas ; j++)
                {
                    //columtitulo=jtable_modelo.getColumnName(j);
                    columtitulo=jtable_modelo_asistenciaxdia_resxsta.getColumnName(j).replace("<html><b>","").split(":");;
                     //System.out.println(titulo+" "+columtitulo+" "+columencontrado);
                    if(columtitulo[0].equals(titulo))
                        {
                            columencontrado=j;
                        }
                }
    return columencontrado;
}
private void crea_hojaasistencia(String idempleado,String departamento,String nombre,String horaentrada,String horasalida,String fecha,int columna,String observacion)
    {
        int numerofilas=this.jtable_modelo.getRowCount();
        String empleadoactual[]=null,texto="";
        int numerocolumnas=jtb_asitencia.getColumnModel().getColumnCount(),ii=00;
        int encontrado=0;

        Object[] fnewRow = new Object[numerocolumnas];
       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<numerofilas;ii++)
                {
                    empleadoactual=jtable_modelo.getValueAt(ii, 1).toString().split(":");
                    //System.out.println(empleadoactual[0]+"="+idempleado+" "+horaentrada+"a"+horasalida);

                    if (empleadoactual[0].equals(idempleado))
                        {
                            encontrado=1;
                            texto=jtable_modelo.getValueAt(ii, columna).toString().replace("<html><p align=justify>","").replace("</p></html>", "");
                            jtable_modelo.setValueAt("<html><p align=justify>"+texto+"<br>"+horaentrada+" a "+horasalida +" "+observacion+" "+"</p></html>",ii ,columna);
                        }
                }
       if(encontrado==0)
            {
                        fnewRow[0]=departamento;
                        fnewRow[1]=idempleado+":"+nombre;
                 for(ii=2;ii<numerocolumnas;ii++)
                            {
                     //System.out.println("ss"+ii+columna);
                               if(ii==columna)
                                    {
                                        fnewRow[ii]="<html><p align=justify>"+horaentrada+" a "+horasalida+" "+observacion+" "+"</p></html>";
                                    }
                               else
                                   {
                                        fnewRow[ii]="";
                                   }
                            }
             jtable_modelo.addRow(fnewRow);
            }
    }
private void carga_datos_hepordiamov(int opcion,String busca1,String busca2,String busca3)
    {
    //invoco al metodo que trae el recordset de datos
     String fechaeuro="",ob="";
    int columnatitulo=0,columnatitulostatus=0,j=0;
    String realiza="",idrealiza="",texto="";
                    for(j = 0 ;j < this.jtable_modelo_asistenciaxdiahe.getRowCount(); j++)
                        {
                        for(int i = 2 ;i < this.jtable_modelo_asistenciaxdiahe.getColumnCount(); i++)
                            {
                                jtable_modelo_asistenciaxdiahe.setValueAt("",j,i);
                            }
                        }


    texto="select * from x1_supervision_empleados_asistencia_catalogo("+opcion+",'"+busca1+"','"+busca2+"','"+busca3+"') as (id integer,fecha date,idp smallint,cant numeric,idempleado integer,canta numeric,idtipohe smallint,obs text,horaref text,tiempor text,tipo text,obst text);";
    System.out.println(texto);
     try
        {
         rs2 = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs2.next())
                {

                        fechaeuro=this.fechaeuropea(rs2.getString("fecha"));
                        columnatitulo=this.findcolumna_xmahe(fechaeuro);
                        if(columnatitulo>0)
                            {
                                this.crea_hoja_hedetalle(rs2.getString("idempleado"),rs2.getString("canta"),rs2.getString("obst"),columnatitulo,rs2.getString("obs"));

                            }
                  }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

      }

private void crea_hoja_hedetalle(String idempleado,String cantidad,String obs,int columna,String obp)
    {
        int numerofilas=this.jtable_modelo_asistenciaxdiahe.getRowCount();
        String empleadoactual[]=null,texto="";
        int numerocolumnas=jtb_asitencia.getColumnModel().getColumnCount(),ii=00;
        int encontrado=0;

        Object[] fnewRow = new Object[numerocolumnas];
       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<numerofilas;ii++)
                {
                    empleadoactual=jtable_modelo_asistenciaxdiahe.getValueAt(ii, 1).toString().split(":");
                    //System.out.println(empleadoactual[0]+"="+idempleado+" "+horaentrada+"a"+horasalida);

                    if (empleadoactual[0].equals(idempleado))
                        {
                            encontrado=1;
                            texto=jtable_modelo_asistenciaxdiahe.getValueAt(ii, columna).toString().replace("<html><p align=justify>","").replace("</p></html>", "");
                            jtable_modelo_asistenciaxdiahe.setValueAt(" "+texto+" "+obs+"="+cantidad+"("+obp+")",ii ,columna);
                        }
                }

    }

private void crea_hoja_tiposhe()
    {
        DecimalFormat miformat = new DecimalFormat("###,###,###");
        String idtiphe="",idtiphee[]=null;
         Object[] fnewRow = new Object[7];
        int ii=0,j=0,encontrado=1;
        for( ii=0;ii<this.jtable_modelo_hecattipo.getRowCount();ii++)
                {
                    encontrado=0;
                    idtiphe=jtable_modelo_hecattipo.getValueAt(ii, 0).toString();
                    // System.out.println("Agregando:"+mesactual+" "+mes);
                     for( j=0;j<this.jtable_modelo_he_detalle.getRowCount();j++)
                            {
                                idtiphee=jtable_modelo_he_detalle.getValueAt(j, 0).toString().split(":");
                                if (idtiphee[0].equals(idtiphe))
                                    {
                                        encontrado=1;
                                    }
                            }
                    if(encontrado==0)
                        {
                                fnewRow[0]=idtiphe+":"+jtable_modelo_hecattipo.getValueAt(ii, 1).toString();
                                fnewRow[1]=this.jtf_asis_fechaasis1.getText();
                                fnewRow[2]="";
                                fnewRow[3]="0";
                                fnewRow[4]="0";
                                fnewRow[5]="00:00";
                                fnewRow[6]="00:00";
                                jtable_modelo_he_detalle.addRow(fnewRow);
                        }
                }
    }

private void carga_datos_tareaxdia(int opcion,String idempleado,String fechaini,String fechafin)
    {
       String fechaeuro="",texto="select * from x1_supervision_empleados_tareas("+opcion+",'"+idempleado+"','"+fechaini+"','"+fechafin+"') as (id integer,fecha date,idempleado integer,idtar smallint,descrip text,iddep smallint,obst text);",tar="";
       int columnatitulo=0;
        System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
               
                fechaeuro=this.fechaeuropea(rs.getString("fecha"));
                columnatitulo=this.findcolumna_xma(fechaeuro);
                //System.out.println("emplea "+rs.getString("idempleado")+" fecha:"+rs.getString("fecha")+" describe:"+rs.getString("descrip")+" Columna:"+columnatitulo+" fecha euro:"+ fechaeuro);
                if(rs.getString("obst").length()>1)
                    tar=rs.getString("obst");
                else
                    tar=rs.getString("descrip");
                this.crea_hoja_tareaprog(rs.getString("idempleado"),tar, columnatitulo);
                }
          }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

     }

private void crea_hoja_tareaprog(String idempleado,String horaentrada,int columna)
    {
        int numerofilas=this.jtable_modelo_asistenciaxdia.getRowCount(),ii=00;
        String empleadoactual[]=null,texto="";
        //invoco al metodo que trae el recordset de datos
     
        for( ii=0;ii<numerofilas;ii++)
                {
                    empleadoactual=jtable_modelo_asistenciaxdia.getValueAt(ii, 1).toString().split(":");
                    
                    if (empleadoactual[0].equals(idempleado))
                        {
                            
                            texto=jtable_modelo_asistenciaxdia.getValueAt(ii, columna).toString().replace("<html>","").replace("</html>", "")+"";
                           //System.out.println(empleadoactual[0]+" hora:"+horaentrada+" columna:"+columna+" empleado:"+idempleado+" texto:"+texto);
                             jtable_modelo_asistenciaxdia.setValueAt("<html>"+texto+" <br>"+horaentrada+" "+"</html>",ii ,columna);

                        }
                }

    }
private void crea_hojastatusresumen(String idempleado,String departamento,String nombre,int columna,String idstatus)
    {
        DecimalFormat miformat = new DecimalFormat("############");
        int numerofilas=this.jtable_modelo_asistenciaxdia_resxsta.getRowCount();
        String empleadoactual[]=null,texto="";
        int numerocolumnas=jt_resumenxstatus.getColumnModel().getColumnCount(),ii=00;
        int encontrado=0;

        Object[] fnewRow = new Object[numerocolumnas];
       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<numerofilas;ii++)
                {
                    empleadoactual=jtable_modelo_asistenciaxdia_resxsta.getValueAt(ii, 1).toString().split(":");
                    //System.out.println(empleadoactual[0]+"="+idempleado+" "+horaentrada+"a"+horasalida);

                    if (empleadoactual[0].equals(idempleado))
                        {
                            encontrado=1;
                            texto=jtable_modelo_asistenciaxdia_resxsta.getValueAt(ii, columna).toString();
                            jtable_modelo_asistenciaxdia_resxsta.setValueAt(miformat.format(Float.valueOf(texto)+1),ii ,columna);
                        }
                }
       if(encontrado==0)
            {
            fnewRow[0]=departamento;
            fnewRow[1]=idempleado+":"+nombre;
                 for(ii=2;ii<numerocolumnas;ii++)
                            {
                     //System.out.println("ss"+ii+columna);
                               if(ii==columna)
                                    {
                                        fnewRow[ii]="1";
                                    }
                               else
                                   {
                                        fnewRow[ii]="0";
                                   }
                            }
             jtable_modelo_asistenciaxdia_resxsta.addRow(fnewRow);
            }
    }

private void crea_hojaasistenciama(String idempleado,String departamento,String nombre,String horaentrada,String horasalida,String stasis,int columna,String observacion,int idstatusasi,String programado)
    {
        int numerofilas=this.jtable_modelo_asistenciaxdia.getRowCount();
        String empleadoactual[]=null,texto="";
        int numerocolumnas=jt_historialasistencia.getColumnModel().getColumnCount(),ii=00;
        int encontrado=0;
        String abrehtml="",cierrahtml="";
        Object[] fnewRow = new Object[numerocolumnas];
         switch (idstatusasi)
                        {
                           case 0:
                                abrehtml="<html><b><font color=#CC0000>";
                                cierrahtml="<font></b></html>";
                            break;
                             case 3:
                                abrehtml="<html><b><font color=#238E23>";
                                cierrahtml="<font></b></html>";
                            break;
                            case 6:
                                abrehtml="<html><b><font color=#0000FF>";
                                cierrahtml="<font></b></html>";
                            break;
                            default:
                                 abrehtml="<html>";
                                 cierrahtml="</html>";
                            break;
                        }
       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<numerofilas;ii++)
                {
                    empleadoactual=jtable_modelo_asistenciaxdia.getValueAt(ii, 1).toString().split(":");
                    //System.out.println(empleadoactual[0]+"="+idempleado+" "+horaentrada+"a"+horasalida);
                    if (empleadoactual[0].equals(idempleado))
                        {
                            encontrado=1;
                            //texto=jtable_modelo_asistenciaxdia.getValueAt(ii, columna).toString().replace("<html><p align=justify>","").replace("</p></html>", "");
                            System.out.println("Fila: "+ii+" columna :"+columna+"  idempleado="+empleadoactual[0]+"  "+stasis+" : "+horaentrada+" a "+horasalida + programado );
                            jtable_modelo_asistenciaxdia.setValueAt(abrehtml+stasis+" : "+horaentrada+" a "+horasalida + programado +cierrahtml,ii ,columna);
                        }
                }
       if(encontrado==0)
            {
                 fnewRow[0]=departamento;
                 fnewRow[1]=idempleado+":"+nombre;
                 for(ii=2;ii<numerocolumnas;ii++)
                            {
                     //System.out.println("ss"+ii+columna);
                               if(ii==columna)
                                    {
                                        fnewRow[ii]=abrehtml+""+stasis+":"+horaentrada+" a "+horasalida+programado+cierrahtml;
                                    }
                               else
                                   {
                                        fnewRow[ii]="00";
                                   }
                            }
             jtable_modelo_asistenciaxdia.addRow(fnewRow);
             fnewRow[0]=departamento;
                 fnewRow[1]=idempleado+":"+nombre;
                 for(ii=2;ii<numerocolumnas;ii++)
                            {
                     //System.out.println("ss"+ii+columna);
                               if(ii==columna)
                                    {
                                        fnewRow[ii]="0";
                                    }
                               else
                                   {
                                        fnewRow[ii]="0";
                                   }
                            }
             jtable_modelo_asistenciaxdiahe.addRow(fnewRow);
            }
    }
private void crea_hojaasistenciamaht(String idempleado,String horas,int columna,String departamento,String nombre)
    {
        int numerofilas=this.jtable_modelo_asistenciaxdia.getRowCount();
        String empleadoactual[]=null,texto="";
        int numerocolumnas=jt_historialasistencia.getColumnModel().getColumnCount(),ii=00;
        int encontrado=0;
        String abrehtml="",cierrahtml="";
        Object[] fnewRow = new Object[numerocolumnas];

        for( ii=0;ii<numerofilas;ii++)
                {
                    empleadoactual=jtable_modelo_asistenciaxdia.getValueAt(ii, 1).toString().split(":");
                    //System.out.println(empleadoactual[0]+"="+idempleado+" "+horaentrada+"a"+horasalida);
                    if (empleadoactual[0].equals(idempleado))
                        {
                            encontrado=1;
                            //texto=jtable_modelo_asistenciaxdia.getValueAt(ii, columna).toString().replace("<html><p align=justify>","").replace("</p></html>", "");
                            System.out.println("creando hrtra"+empleadoactual[0]+"="+idempleado+" "+horas);
                            jtable_modelo_asistenciaxdia.setValueAt(horas,ii ,columna);
                        }
                }
        if(encontrado==0)
            {
                 fnewRow[0]=departamento;
                 fnewRow[1]=idempleado+":"+nombre;
                 for(ii=2;ii<numerocolumnas;ii++)
                            {
                     //System.out.println("ss"+ii+columna);
                               if(ii==columna)
                                    {
                                        fnewRow[ii]=horas;
                                    }
                               else
                                   {
                                        fnewRow[ii]="00";
                                   }
                            }
             jtable_modelo_asistenciaxdia.addRow(fnewRow);
             fnewRow[0]=departamento;
                 fnewRow[1]=idempleado+":"+nombre;
                 for(ii=2;ii<numerocolumnas;ii++)
                            {
                     //System.out.println("ss"+ii+columna);
                               if(ii==columna)
                                    {
                                        fnewRow[ii]="0";
                                    }
                               else
                                   {
                                        fnewRow[ii]="0";
                                   }
                            }
             jtable_modelo_asistenciaxdiahe.addRow(fnewRow);
            }

    }
private void crea_hojaasistenciama_sinchecar(String idempleado,String departamento,String nombre,String horaentrada,String horasalida,String stasis,int columna,String observacion,int idstatusasi)
    {
        int numerofilas=this.jtable_modelo_asistenciaxdia.getRowCount();
        String empleadoactual[]=null,texto="";
        int numerocolumnas=jt_historialasistencia.getColumnModel().getColumnCount(),ii=00;
        int encontrado=0;
        String abrehtml="",cierrahtml="";
        Object[] fnewRow = new Object[numerocolumnas];

       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<numerofilas;ii++)
                {
                    empleadoactual=jtable_modelo_asistenciaxdia.getValueAt(ii, 1).toString().split(":");
                     if (empleadoactual[0].equals(idempleado))
                        {
                            encontrado=1;
                        }
                }
       if(encontrado==0)
            {
                 fnewRow[0]=departamento;
                 fnewRow[1]=idempleado+":"+nombre;
                 for(ii=2;ii<numerocolumnas;ii++)
                            {
                     //System.out.println("ss"+ii+columna);
                               if(ii==columna)
                                    {
                                        fnewRow[ii]="00";
                                    }
                               else
                                   {
                                        fnewRow[ii]="00";
                                   }
                            }
             jtable_modelo_asistenciaxdia.addRow(fnewRow);
            }
    }
private void crea_hojaasistenciama_hepordia(String idempleado,String cantidad,int columna)
    {
        int numerofilas=this.jtable_modelo_asistenciaxdiahe.getRowCount();
        String empleadoactual[]=null,texto="";
        int numerocolumnas=jt_historialasistencia1.getColumnModel().getColumnCount(),ii=00;
        int encontrado=0;
        String abrehtml="",cierrahtml="";
        Object[] fnewRow = new Object[numerocolumnas];

       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<numerofilas;ii++)
                {
                    empleadoactual=jtable_modelo_asistenciaxdiahe.getValueAt(ii, 1).toString().split(":");
                     if (empleadoactual[0].equals(idempleado))
                        {
                            jtable_modelo_asistenciaxdiahe.setValueAt(cantidad,ii,columna);
                        }
                }

    }

private void carga_datos_asistencia(int opcion,String depar,String fechaini,String fechafin)
    {
       //invoco al metodo que trae el recordset de datos

       String fechaeuro="";
       int columnatitulo=0;
        if (this.jckb_noeliminar.isSelected()==false)
            {
                while(jtable_modelo.getRowCount()>0)jtable_modelo.removeRow(0);
            }
        try
         {
            rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_asistencia("+opcion+","+depar+",'"+fechaini+"','"+fechafin+"') as (idregistro integer,idemplea integer,nombre character varying(50),nombre_apater character varying(50),nombre_apamat character varying(50),iddepa smallint,idpuesto smallint,idstatus smallint, fechaasist date,horaentrada time,horasalida time,observa text,descripdepa character varying(80),descrippuesto text,descripstatus character varying(25));",variables_global.getconexiongral());
            while (rs.next())
                {
                fechaeuro=this.fechaeuropea(rs.getString("fechaasist"));
                columnatitulo=this.findcolumna(fechaeuro);
                this.crea_hojaasistencia(rs.getString("idemplea"), rs.getString("iddepa")+":"+rs.getString("descripdepa"), rs.getString("nombre")+" "+rs.getString("nombre_apater")+" "+rs.getString("nombre_apamat"), rs.getString("horaentrada").substring(0, 5), rs.getString("horasalida").substring(0,5), fechaeuro,columnatitulo,rs.getString("observa"));
                }
          }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

     }
private void carga_datos_puntualidad(int opcion,String orden,String fechaini,String fechafin)
    {
       //invoco al metodo que trae el recordset de datos

       String texto="select * from x1_supervision_empleados_asistencia_catalogo("+opcion+",'"+orden+"','"+fechaini+"','"+fechafin+"') as (idemp integer,idsta smallint,cantidad bigint,nombre text,depa text,puesto text,puntalidad text,fechaa text,idarea smallint,estatus character varying(25));";

       while(jtable_modelo_empleado.getRowCount()>0)jtable_modelo_empleado.removeRow(0);

        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                this.crea_hojapuntualidad(rs.getString("idemp"),rs.getString("depa"),rs.getString("nombre"),rs.getInt("idsta"),rs.getString("puesto"),rs.getString("cantidad"),rs.getString("fechaa"),rs.getString("estatus"));
                }
          }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
        this.calcular_totalespuntual();
     }
private void crea_hojapuntualidad(String idempleado,String departamento,String nombre,int columna,String puesto,String cantidad,String fechaa,String estatus)
    {
        String empleadoactual="",texto="";
        int ii=0,encontrado=0;

        Object[] fnewRow = new Object[12];
       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<this.jtable_modelo_empleado.getRowCount();ii++)
                {
                    empleadoactual=jtable_modelo_empleado.getValueAt(ii, 0).toString();
                    if (empleadoactual.equals(idempleado))
                            {
                            encontrado=1;
                            switch (columna)
                                {
                                case 0:
                                        jtable_modelo_empleado.setValueAt(cantidad,ii ,8);
                                break;
                                case 1:
                                        jtable_modelo_empleado.setValueAt(cantidad,ii ,5);
                                break;
                                case 2:
                                        jtable_modelo_empleado.setValueAt(cantidad,ii ,6);
                                break;
                                case 3:
                                        jtable_modelo_empleado.setValueAt(cantidad,ii ,7);
                                break;
                                case 4:
                                        jtable_modelo_empleado.setValueAt(cantidad,ii ,7);
                                break;
                                }
                            }
                }
       if(encontrado==0)
            {
            fnewRow[0]=idempleado;
            fnewRow[1]=nombre;
            fnewRow[2]=departamento;
            fnewRow[3]=puesto;
            fnewRow[4]=fechaa;
            fnewRow[10]="0";
            fnewRow[11]=estatus;
                switch (columna)
                        {
                            case 0:
                                    fnewRow[5]="0";
                                    fnewRow[6]="0";
                                    fnewRow[7]="0";
                                    fnewRow[8]=cantidad;
                                    fnewRow[9]="0";
                            break;
                            case 1:
                                    fnewRow[5]=cantidad;
                                    fnewRow[6]="0";
                                    fnewRow[7]="0";
                                    fnewRow[8]="0";
                                    fnewRow[9]="0";
                            break;
                            case 2:
                                    fnewRow[5]="0";
                                    fnewRow[6]=cantidad;
                                    fnewRow[7]="0";
                                    fnewRow[8]="0";
                                    fnewRow[9]="0";
                            break;
                            case 3:
                                    
                                    fnewRow[5]="0";
                                    fnewRow[6]="0";
                                    fnewRow[7]=cantidad;
                                    fnewRow[8]="0";
                                    fnewRow[9]="0";
                            break;
                            case 4:

                                    fnewRow[5]="0";
                                    fnewRow[6]="0";
                                    fnewRow[7]="0";
                                    fnewRow[8]="0";
                                    fnewRow[9]=cantidad;
                            break;
                        }
             jtable_modelo_empleado.addRow(fnewRow);
            }
    }


private void carga_datos_asistenciaindi(int opcion,String busca1,String busca2,String busca3)
    {
    //invoco al metodo que trae el recordset de datos
     java.util.Date fechaestaeuropa=null;
    int encontro=0,minutos=0;
     String realiza="",idrealiza="",tiempo[]=null,horastrab="",minutoscomi="",horaextra="";
    this.jbtn_asistenciarev.setVisible(false);
    Object[] fnewRow = new Object[7];
    String texto="select * from x1_supervision_empleados_asistencia_catalogo("+opcion+",'"+busca1+"','"+busca2+"','"+busca3+"') as (id integer,fechaasiste date,idempleado integer,horaentrada time,horasalida time,idstatus smallint,observ text,iddepartamento smallint,idstatusconfirma smallint,fechasalida date,horastrabajadas numeric,horaentrada_pro time,horasalida_pro time,horaentrada_dcomipro time,horasalid_dcomipro time,minutoscomi smallint,fecha_p_nomina date,nombreempleado character varying(50),nombrepat character varying(50),nombremat character varying(50),statusdescribe text,describedepa character varying(80),statusconfirmacion text,observ_status text,idpun smallint, puntuad text,horastrab interval,mincomida interval);";
    System.out.println(texto);
    this.jcmbx_asist_status.removeAllItems();
      DecimalFormat myFormat2 = new DecimalFormat("############");
    //this.jcmbx_asist_Hrsextras.removeAllItems();
    try
        {
         rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    encontro=1;
                    opcionupdate=1;
//                    this.jep_foto.setText("<html><head></head><body><p style=\"margin-top: 0\"><img src=\"http://"+variables_global.getHostfotos()+"/javaweb/rhfotos/"+rs.getString("idempleado")+".JPG"+"\" width=\"270\" height=\"185\" border=\"0\" alt=\"Foto\"></img></p></body></html>");
                    this.jftf_asist_horaentrada.setText(rs.getString("horaentrada").substring(0,5)+"");
                    this.jftf_asist_horasalida.setText(rs.getString("horasalida").substring(0,5)+"");
                    this.jcmbx_asist_status.addItem(rs.getString("idstatus")+":"+rs.getString("statusdescribe")+"("+rs.getString("observ_status")+")");
                    this.jtf_hestatus.setText(rs.getString("statusdescribe"));
                    this.jtf_asist_boservaciones.setText(rs.getString("observ"));
                    this.jftf_asist_id.setText(rs.getString("id"));
                    this.jftf_asist_idemplea.setText(rs.getString("idempleado"));

                            this.jtf_asis_fechaasis.setText(this.fechaeuropea(rs.getString("fechaasiste"))+":"+this.DiaSemana(rs.getString("fechaasiste")));
                      if (rs.getString("fechasalida")!= null)
                        {
                           this.jtf_asis_fechasalida.setText(this.fechaeuropea(rs.getString("fechasalida"))+" "+this.DiaSemana(rs.getString("fechasalida")));
                        }
                   
                    this.jtf_horastrabajadas.setText(rs.getString("horastrabajadas"));
                     this.jtf_asist_horaent_pro.setText(rs.getString("horaentrada_pro").substring(0,5)+"");
                    this.jftf_asist_salidaprog.setText(rs.getString("horasalida_pro").substring(0,5)+"");
                      this.jtf_asist_horaen_dcom.setText(rs.getString("horaentrada_dcomipro").substring(0,5)+"");
                    this.jtf_asist_horasa_dcom.setText(rs.getString("horasalid_dcomipro").substring(0,5)+"");
                    this.jtf_minutoscomida.setText(rs.getString("minutoscomi"));
                    System.out.println(rs.getString("fechaasiste"));
                     if (rs.getString("fecha_p_nomina")!= null)
                        {
                            try
                                {
                                    fechaestaeuropa = formateadoresta.parse(rs.getString("fecha_p_nomina"));
                                    this.jdc_fechanomina.setDate(fechaestaeuropa);
                                }
                            catch (ParseException e)
                                {
                                //Error, la cadena de texto no se puede convertir en fecha.
                                }
                        }
                     else
                          {
                            try
                                {
                                    fechaestaeuropa = formateadoresta.parse(rs.getString("fechaasiste"));
                                    this.jdc_fechanomina.setDate(fechaestaeuropa);
                                }
                            catch (ParseException e)
                                {
                                //Error, la cadena de texto no se puede convertir en fecha.
                                }
                        }

                    this.jcmbx_asist_status.requestFocus();
                   System.out.println("hola "+rs.getString("idpun").toString());
                    switch (rs.getInt("idpun"))
                        {
                            case 0:
                                   this.jlbl_describepuntualidad.setForeground(Color.black);
                                   this.jlbl_describepuntualidad1.setForeground(Color.black);
                            break;
                            case 1:
                                    this.jlbl_describepuntualidad.setForeground(Color.green);
                                    this.jlbl_describepuntualidad1.setForeground(Color.green);
                            break;
                            case 2:
                                    this.jlbl_describepuntualidad.setForeground(Color.yellow);
                                    this.jlbl_describepuntualidad1.setForeground(Color.yellow);
                            break;
                            case 3:
                                    this.jlbl_describepuntualidad.setForeground(Color.orange);
                                    this.jlbl_describepuntualidad1.setForeground(Color.orange);
                            break;
                            default:
                            break;
                        }
                        if(rs.getInt("idstatusconfirma")==1)
                            {
                                this.jbtn_asistenciarev.setVisible(true);
                            }
                     this.jlbl_describepuntualidad.setText("Asistencia:"+rs.getString("puntuad"));
                     this.jlbl_describepuntualidad1.setText("Asistencia:"+rs.getString("puntuad"));
                     
                          if((rs.getString("horastrab")!=null)&&(!rs.getString("horasalida").substring(0, 5).equals("00:00")))
                            {
                                tiempo=rs.getString("mincomida").split(":");
                                minutos=(Integer.valueOf(tiempo[0])*60)+(Integer.valueOf(tiempo[1]));
                                minutoscomi=myFormat2.format(minutos);
                                horastrab=rs.getString("horastrab").substring(0,5);
                                this.jtf_horastrabajadas.setText(horastrab);
                                this.jtf_minutoscomida1.setText(minutoscomi);

                                this.jtf_horastrabajadas1.setText(horastrab);
                                this.jtf_minutoscomida2.setText(minutoscomi);

                            }
                         else
                            {
                                this.jtf_horastrabajadas.setText("0");
                                this.jtf_minutoscomida1.setText("0");
                                this.jtf_horastrabajadas1.setText("0");
                                this.jtf_minutoscomida2.setText("0");
                            }

                            this.jftf_asist_horaentrada3.setText(rs.getString("horaentrada").substring(0,5)+"");
                            this.jftf_asist_horasalida1.setText(rs.getString("horasalida").substring(0,5)+"");
                     this.loadcomboasist_status();
                     //this.loadcomboa_hrsextras();
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
        if (encontro==0)
                {
                    this.jcmbx_asist_status.removeAllItems();
                    opcionupdate=2;
                    this.jftf_asist_horaentrada.setText("00:00");
                    this.jftf_asist_horasalida.setText("00:00");

                    this.jftf_asist_horaentrada3.setText("00:00");
                    this.jftf_asist_horasalida1.setText("00:00");
                    this.jtf_horastrabajadas1.setText("00:00");
                    this.jtf_minutoscomida2.setText("00:00");

                    this.jtf_asist_boservaciones.setText("");
                    System.out.println(busca2);
                    this.loadcomboasist_status();
                            try
                                {
                                    fechaestaeuropa = formateadoresta.parse(busca2);
                                    this.jdc_fechanomina.setDate(fechaestaeuropa);
                                }
                            catch (ParseException e)
                                {
                                //Error, la cadena de texto no se puede convertir en fecha.
                                }
                    //this.jtf_asist_horaent_pro.setText("00:00:00");
                    //this.jftf_asist_salidaprog.setText("00:00:00");
                    //this.jtf_asist_horaen_dcom.setText("00:00:00");
                    //this.jtf_asist_horasa_dcom.setText("00:00:00");
                    //this.jtf_minutoscomida.setText("30");
                }
        else
            {
                  try {
                    // TODO add your handling code here:
                        this.calcular_horastrab();
                    } catch (ParseException ex) {
                        Logger.getLogger(supervision_rh_asistencia_xdia.class.getName()).log(Level.SEVERE, null, ex);
                    }
            }
    if(variables_global.getnivelusu()==7)
        {
        this.jbtn_asistenciarev.setVisible(false);
        }
    this.repaint();
      }
private void carga_datos_asistenciama(int opcion,String busca1,String busca2,String busca3)
    {
    //invoco al metodo que trae el recordset de datos
     String fechaeuro="",ob="";
    int columnatitulo=0,columnatitulostatus=0;
    String realiza="",idrealiza="",texto="";
    if (this.jckb_noeliminar.isSelected()==false)
        {
            while(jtable_modelo_asistenciaxdia.getRowCount()>0)jtable_modelo_asistenciaxdia.removeRow(0);
            while(jtable_modelo_asistenciaxdiahe.getRowCount()>0)jtable_modelo_asistenciaxdiahe.removeRow(0);
            while(jtable_modelo_asistenciaxdia_resxsta.getRowCount()>0)jtable_modelo_asistenciaxdia_resxsta.removeRow(0);

        }
    // texto="select * from x1_supervision_empleados_asistencia_catalogo("+opcion+",'"+busca1+"','"+busca2+"','"+busca3+"') as (id integer,fechaasiste date,idempleado integer,horaentrada time,horasalida time,idstatus smallint,observ text,iddepartamento smallint,idstatusconfirma smallint,fechasalida date,horastrabajadas numeric,horaentrada_pro time,horasalida_pro time,horaentrada_dcomipro time,horasalid_dcomipro time,minutoscomi smallint,fecha_p_nomina date,nombreempleado character varying(50),nombrepat character varying(50),nombremat character varying(50),statusdescribe text,describedepa character varying(80),statusconfirmacion text,observ_status text);";
    // System.out.println(texto);
     texto="select * from x1_supervision_empleados_asistencia_catalogo("+opcion+",'"+busca1+"','"+busca2+"','"+busca3+"') as (id integer,fechaasiste date,idempleado integer,horaentrada time,horasalida time,idstatus smallint,observ text,iddepartamento smallint,idstatusconfirma smallint,fechasalida date,horastrabajadas numeric,horaentrada_pro time,horasalida_pro time,horaentrada_dcomipro time,horasalid_dcomipro time,minutoscomi smallint,fecha_p_nomina date,nombreempleado character varying(50),nombrepat character varying(50),nombremat character varying(50),statusdescribe text,describedepa character varying(80),statusconfirmacion text,observ_status text,idpun smallint, puntuad text,horastrab interval,mincomida interval);";
     System.out.println(texto);
     try
        {
         rs2 = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs2.next())
                {
                   ob="";
                    ob=rs2.getString("observ");
                        fechaeuro=this.fechaeuropea(rs2.getString("fechaasiste"));
                        columnatitulo=this.findcolumna_xma(fechaeuro);
                        //System.out.println(fechaeuro+" "+rs2.getString("idempleado")+ rs2.getString("iddepartamento")+":"+rs2.getString("describedepa")+rs2.getString("nombreempleado")+" "+rs2.getString("nombrepat")+" "+rs2.getString("nombremat")+ rs2.getString("horaentrada").substring(0, 5)+ rs2.getString("horasalida").substring(0,5)+ rs2.getString("observ_status")+columnatitulo+ob+rs2.getInt("idstatus")+"<br> Prog:"+rs2.getString("horaentrada_pro").substring(0, 5) +" : "+ rs2.getString("horasalida_pro").substring(0,5)+" Y <br>"+rs2.getString("horaentrada_dcomipro").substring(0, 5) +" : "+ rs2.getString("horasalid_dcomipro").substring(0,5));
                        if(columnatitulo>0)
                            {
                                if((!this.jckb_verhrstrab.isSelected())&&(!this.jckb_verhrstrab1.isSelected()))
                                    {
                                        this.crea_hojaasistenciama(rs2.getString("idempleado"), rs2.getString("iddepartamento")+":"+rs2.getString("describedepa"), rs2.getString("nombreempleado")+" "+rs2.getString("nombrepat")+" "+rs2.getString("nombremat"), rs2.getString("horaentrada").substring(0, 5), rs2.getString("horasalida").substring(0,5), rs2.getString("observ_status"),columnatitulo,ob,rs2.getInt("idstatus"),"<br> Prog:"+rs2.getString("horaentrada_pro").substring(0, 5) +" : "+ rs2.getString("horasalida_pro").substring(0,5)+" Y <br>"+rs2.getString("horaentrada_dcomipro").substring(0, 5) +" : "+ rs2.getString("horasalid_dcomipro").substring(0,5));
                                        columnatitulostatus=this.findcolumna_status(rs2.getString("idstatus"));
                                        this.crea_hojastatusresumen(rs2.getString("idempleado"), rs2.getString("iddepartamento")+":"+rs2.getString("describedepa"), rs2.getString("nombreempleado"), columnatitulostatus, rs2.getString("idstatus"));
                                    }
                                else
                                    {
                                        System.out.println("creando hrtra"+rs2.getString("horastrabajadas"));
                                        if(rs2.getString("horastrab")!=null)
                                                {
                                                if(!this.jckb_verhrstrab1.isSelected())
                                                    {

                                                        this.crea_hojaasistenciamaht(rs2.getString("idempleado"), rs2.getString("horastrab").substring(0, 5), columnatitulo,rs2.getString("iddepartamento")+":"+rs2.getString("describedepa"),rs2.getString("nombreempleado")+" "+rs2.getString("nombrepat")+" "+rs2.getString("nombremat"));
                                                    }
                                                else
                                                    {
                                                            Date hora2 = formateadorht.parse(""+this.fechaeuropea(rs2.getString("fechaasiste"))+" "+rs2.getString("horastrab").substring(0, 5)+"");
                                                            Date hora1 = formateadorht.parse(""+this.fechaeuropea(rs2.getString("fechaasiste"))+" "+"08:00"+"");
                                                            float het=0,heg=0;
                                                            long lantes = hora1.getTime();
                                                            long lahora = hora2.getTime();

                                                            long diferencia = (lahora-lantes);
                                                            System.out.println("diferencia:"+diferencia);
                                                            if(diferencia>0)
                                                                {
                                                                    long segundos = diferencia / 1000;
                                                                    long horas = segundos / 3600;
                                                                    segundos -= horas * 3600;
                                                                    long minutos2 = segundos / 60;
                                                                    segundos -= minutos2 * 60;
                                                                    if((minutos2>=20) || (horas>=1))
                                                                        {
                                                                            if((minutos2>=20) && (minutos2<50))
                                                                                {
                                                                                    het=(float) 0.5;
                                                                                }
                                                                           if(minutos2>=50)
                                                                                {
                                                                                    het=(float) 1;
                                                                                }
                                                                            if(minutos2<20)
                                                                                {
                                                                                    het=(float) 0;
                                                                                }
                                                                         }
                                                                        else
                                                                            {
                                                                                het=0;
                                                                            }

                                                                    heg=horas+het;
                                                                }

                                                            this.crea_hojaasistenciamaht(rs2.getString("idempleado"), String.valueOf(heg), columnatitulo,rs2.getString("iddepartamento")+":"+rs2.getString("describedepa"),rs2.getString("nombreempleado")+" "+rs2.getString("nombrepat")+" "+rs2.getString("nombremat"));
                                                    }
                                                }


                                }
                            }
                  }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

       
      }
private void carga_datos_asistencia_detalle(int opcion,String busca1,String busca2,String busca3)
    {
    //invoco al metodo que trae el recordset de datos
    int encontro=0;
    String realiza="",idrealiza="",texto="";
    if (this.jckb_noeliminar.isSelected()==false)
        {
                while(jtable_modelo_asistenciaxdia_detalle.getRowCount()>0)jtable_modelo_asistenciaxdia_detalle.removeRow(0);
        }
   
    Object[] fnewRow = new Object[6];
    texto="select * from x1_supervision_empleados_asistencia_catalogo("+opcion+",'"+busca1+"','"+busca2+"','"+busca3+"') as (id integer,fechaasiste date,idempleado integer,horaentrada time,horasalida time,idstatus smallint,observaciones text,iddepartamento smallint,statusdescribe text,describedepa character varying(80),tipc smallint,depasal character varying(80));";
    System.out.println(texto);
    try
        {
         rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    switch (rs.getInt("tipc"))
                        {
                            case 0:
                                   fnewRow[0]="CODIGO";
                            break;
                            case 1:
                                   fnewRow[0]="E:HUELLA";
                            break;
                            case 2:
                                   fnewRow[0]="E:HUELLA Y S";
                            break;
                        }
                    
                    //fnewRow[1]=rs.getString("nombreempleado")+" "+rs.getString("nombrepat");
                    fnewRow[1]=rs.getString("idstatus")+":"+rs.getString("statusdescribe");
                    fnewRow[2]=rs.getString("horaentrada").substring(0,5);
                    fnewRow[3]=rs.getString("horasalida").substring(0,5);
                    fnewRow[4]=rs.getString("observaciones");
                    fnewRow[5]="<html>E:"+rs.getString("describedepa")+"<br>S:"+rs.getString("depasal")+"</html>";
                    jtable_modelo_asistenciaxdia_detalle.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
      this.carga_datos_empleado(4,textobuscadepa);
      int numerofilas=this.jtable_modelo_asistenciaxdia_detalle.getRowCount();

       for(int i = 0 ;i < numerofilas; i++)
                {
                     jtb_asitencia.setRowHeight(i, 40);
                }
}
private void carga_datos_he_detalle(int opcion,String busca1,String busca2,String busca3)
    {
    //invoco al metodo que trae el recordset de datos
    while(jtable_modelo_he_detalle.getRowCount()>0)jtable_modelo_he_detalle.removeRow(0);


    Object[] fnewRow = new Object[7];
    String texto="select * from x1_supervision_empleados_asistencia_catalogo("+opcion+",'"+busca1+"','"+busca2+"','"+busca3+"') as (id integer,fecha date,idp smallint,cant numeric,idempleado integer,canta numeric,idtipohe smallint,obs text,horaref text,tiempor text);";
    System.out.println(texto);
    try
        {
         rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    switch (rs.getInt("idtipohe"))
                        {
                            case 1:
                                   fnewRow[0]="1:PREVIO APER. AREA";
                            break;
                            case 2:
                                   fnewRow[0]="2:TIEMPO COMIDA SUPRIMIDA";
                            break;
                            case 3:
                                   fnewRow[0]="3:EXTENSION JORNADA";
                            break;
                            case 4:
                                   fnewRow[0]="4:GENERAL";
                            break;
                        }

                    //fnewRow[1]=rs.getString("nombreempleado")+" "+rs.getString("nombrepat");
                    fnewRow[1]=this.fechaeuropea(rs.getString("fecha"));
                    fnewRow[2]=rs.getString("obs");
                    fnewRow[3]=rs.getString("cant");
                    fnewRow[4]=rs.getString("canta");
                    fnewRow[5]=rs.getString("tiempor");
                    fnewRow[6]=rs.getString("horaref");
                    jtable_modelo_he_detalle.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

}

private void carga_datos_insidencias(int opcion,String busca1,String busca2,String busca3)
    {
    //invoco al metodo que trae el recordset de datos
    String texto="select * from x1_supervision_empleados_catalogo_insidencias("+opcion+",'"+busca1+"','"+busca1+"','','') as (id integer,fechasol date,idempleado integer,hora time,fechai date,fechaf date,observaciones text,obser2 text,idtipoe smallint,idopera integer,insides text,nombreempleado text,nombreope text,idplaza smallint,area text,puesto text);";
                System.out.println(texto);
                Object[] fnewRow = new Object[7];
                while(jtable_modelo_insidencias.getRowCount()>0)jtable_modelo_insidencias.removeRow(0);
                try
                    {
                        rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                        while (rs.next())
                            {
                                fnewRow[0]=this.fechaeuropea(rs.getString("fechasol"));
                                fnewRow[1]=rs.getString("puesto")+" ("+rs.getString("area")+")";
                                fnewRow[2]=rs.getString("nombreempleado");
                                fnewRow[3]=this.fechaeuropea(rs.getString("fechai"));
                                fnewRow[4]=this.fechaeuropea(rs.getString("fechaf"));
                                fnewRow[5]=rs.getString("observaciones");
                                fnewRow[6]=rs.getString("nombreope");
                                jtable_modelo_insidencias.addRow(fnewRow);

                            }
                    }
                        catch(Exception e)
                            {
                                System.out.println(e.getMessage());
                            }

}


private void carga_datos_eventoshis(int opcion,String busca1,String busca2,String busca3)
    {
    //invoco al metodo que trae el recordset de datos
    String texto="select * from x1_supervision_empleados_asistencia_eventos("+opcion+",'"+busca1+"','"+busca1+"','') as (id integer,fechaasiste date,idempleado integer,hora time,observaciones text,idtipoe smallint,iddepartamento smallint,nombreempleado character varying(50),nombrepat character varying(50),nombremat character varying(50),describedepa character varying(80));";
                System.out.println(texto);
                Object[] fnewRow = new Object[5];
                while(jtable_modelo_eventos.getRowCount()>0)jtable_modelo_eventos.removeRow(0);
                try
                    {
                        rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                        while (rs.next())
                            {

                                fnewRow[0]=rs.getString("describedepa");
                                    switch (rs.getInt("idtipoe"))
                                    {

                                      case 1:
                                             fnewRow[1]="E. Turno";
                                      break;
                                      case 2:
                                             fnewRow[1]="S. Turno";
                                      break;
                                      case 3:
                                         fnewRow[1]="E. Durante Jornada";
                                      break;
                                        case 4:
                                         fnewRow[1]="S. Durante Jornada";
                                      break;
                                      case 5:
                                         fnewRow[1]="Falta";
                                      break;
                                      case 6:
                                         fnewRow[1]="Descanso";
                                      break;
                                      case 7:
                                         fnewRow[1]="NOTIFICACION!!!!";
                                      break;
                                    }
                                fnewRow[2]=rs.getString("nombreempleado")+" "+rs.getString("nombrepat")+" "+rs.getString("nombrepat");
                                fnewRow[3]=rs.getString("hora").substring(0,5);
                                fnewRow[4]=rs.getString("observaciones");
                                jtable_modelo_eventos.addRow(fnewRow);

                            }
                    }
                        catch(Exception e)
                            {
                                System.out.println(e.getMessage());
                            }

}

private void asistencia_actualiza(int opcion,String idasist,String empleado,String observacion,String departamento,String shorae,String shoras,String idstatus,String valorx,String fechasal, String horastraba, String horaentprog, String horasalprog, String horaentdcom, String horasaldcom, String minutoscom, String fechanomina, String extra2)
    {
       //invoco al metodo que trae el recordset de datos
    int encontrado=0,columnatitulo=0;
    String texto="select * from x1_supervision_empleados_asistenciamaestro_update("+opcion+","+idasist+","+empleado+",'"+observacion+"',"+departamento+",'"+shorae+"','"+shoras+"','"+idstatus+"','"+valorx+"','"+fechasal+"','"+horastraba+"','"+horaentprog+"','"+horasalprog+"','"+horaentdcom+"','"+horasaldcom+"','"+minutoscom+"','"+fechanomina+"','"+extra2+"');";
    System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                       encontrado=rs.getInt(1);
                }
         }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
       if (encontrado==1)
              {
                    columnatitulo=this.findcolumna_xma(this.jtf_asis_fechaasis.getText().substring(0, 10));
                    String obserstatuspuro=this.jcmbx_asist_status.getSelectedItem().toString().replace("(", ":").replace(")", ":");
                    String obserstatus[]=obserstatuspuro.split(":");
                    this.crea_hojaasistenciama(empleado,departamento+":"+departamento, ""+" "+""+" "+"", shorae.substring(0, 5),shoras.substring(0,5), obserstatus[2],columnatitulo,observacion,Integer.valueOf(idstatus),"<br>P:"+this.jtf_asist_horaent_pro.getText()+" a "+this.jftf_asist_salidaprog.getText()+" y <br>"+this.jtf_asist_horaen_dcom.getText()+" "+this.jtf_asist_horasa_dcom.getText());
                    yacargueresxstatus=0;
                    JOptionPane.showMessageDialog(null,"Gracias Registro Correcto!", "Sistema Integral(Modificando Asistencia) : Ayuda",1);
                    //this.carga_datos_asistencia(2, this.jtf_empid.getText(),this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
              }
       else
              {
               //JOptionPane.showMessageDialog(null,"Error Clave:"+codigoenvia+" No existe!", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
              }
    }
private void carga_datos_he_detallemov(int opcion,String busca1,String busca2,String busca3)
    {
    //invoco al metodo que trae el recordset de datos
    while(jtable_modelo_asistenciaxdiahe.getRowCount()>0)jtable_modelo_asistenciaxdiahe.removeRow(0);


    Object[] fnewRow = new Object[7];
    String texto="select * from x1_supervision_empleados_asistencia_catalogo("+opcion+",'"+busca1+"','"+busca2+"','"+busca3+"') as (id integer,fecha date,idp smallint,cant numeric,idempleado integer,canta numeric,idtipohe smallint,obs text,horaref text,tiempor text);";
    System.out.println(texto);
    try
        {
         rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    switch (rs.getInt("idtipohe"))
                        {
                            case 1:
                                   fnewRow[0]="1:PREVIO APER. AREA";
                            break;
                            case 2:
                                   fnewRow[0]="2:TIEMPO COMIDA SUPRIMIDA";
                            break;
                            case 3:
                                   fnewRow[0]="3:EXTENSION JORNADA";
                            break;
                            case 4:
                                   fnewRow[0]="4:GENERAL";
                            break;
                        }

                    //fnewRow[1]=rs.getString("nombreempleado")+" "+rs.getString("nombrepat");
                    fnewRow[1]=this.fechaeuropea(rs.getString("fecha"));
                    fnewRow[2]=rs.getString("obs");
                    fnewRow[3]=rs.getString("cant");
                    fnewRow[4]=rs.getString("canta");
                    fnewRow[5]=rs.getString("tiempor");
                    fnewRow[6]=rs.getString("horaref");
                    jtable_modelo_he_detalle.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

}
private void asistencia_movperdxdia(int opcion,String empleado,String observacion,String fechasal,String cantidad)
    {
       //invoco al metodo que trae el recordset de datos
    int encontrado=0,columnatitulo=0;
    String texto="select * from x1_supervision_empleados_prenomina_doctos_insmovxdia(1,'"+""+"','"+fechasal+"','"+"9"+"',"+empleado+",'"+observacion+"','"+cantidad+"','','');";
    System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                       encontrado=rs.getInt(1);
                }
         }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
       if (encontrado==1)
              {
                    JOptionPane.showMessageDialog(null,"Horas Ext. Guardada Correctamente!", "Sistema Integral(Modificando Asistencia) : Ayuda",1);
                    //this.carga_datos_asistencia(2, this.jtf_empid.getText(),this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
              }
       else
              {
               JOptionPane.showMessageDialog(null,"Error Horas Extras:"+this.jtf_empleadoactualnombre.getText()+" Revise Cantidad!", "Sistema Integral(Modificando Asistencia) : Ayuda",1);
              }
    }
private void carga_datos_hepordia(int opcion,String busca1,String busca2,String busca3)
    {
    //invoco al metodo que trae el recordset de datos
     String fechaeuro="",ob="";
    int columnatitulo=0,columnatitulostatus=0;
    String realiza="",idrealiza="",texto="";

     texto="select * from x1_supervision_empleados_asistencia_catalogo("+opcion+",'"+busca1+"','"+busca2+"','"+busca3+"') as (fecha date,cantidad numeric,idemp integer,cantidada numeric);";
     System.out.println(texto);
     try
        {
         rs2 = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs2.next())
                {

                        fechaeuro=this.fechaeuropea(rs2.getString("fecha"));
                        columnatitulo=this.findcolumna_xma(fechaeuro);
                        if(columnatitulo>0)
                            {
                                this.crea_hojaasistenciama_hepordia(rs2.getString("idemp"),rs2.getString("cantidada") ,columnatitulo);
                            }
                  }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
        //this.contruir_totaleshe();
      }

private void carga_datos_empleado(int opcion,String textobusca)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       //this.LimpiarJTable();
    if (this.jckb_noeliminar.isSelected()==false)
        {
           while(this.jtable_modelo.getRowCount()>0)this.jtable_modelo.removeRow(0);
        }

       Object[] fnewRow = new Object[8];
       try
           {
            rs = x.sieuno_executediversosv2("select * from x1_supervision_empleadosv2("+opcion+",'"+textobusca+"') as (id integer,nombre text,id_depart smallint,fecha_alta text,descri_depa character varying(80));",variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[1]=rs.getString("id_depart")+":"+rs.getString("descri_depa");
                        fnewRow[3]=rs.getString("id")+":"+rs.getString("nombre");
                        this.crea_hojaasistenciama_sinchecar(rs.getString("id"), rs.getString("id_depart")+":"+rs.getString("descri_depa"),rs.getString("nombre"),"","","",2,"",0);
                }
           }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
    }



private void carga_datos_prenominas(int opcion,String busca,String busca2){
    while(jtable_modelo_prenomina.getRowCount()>0)jtable_modelo_prenomina.removeRow(0);
    String texto="select * from x1_supervision_empleados_prenomina_doctos_catalogo("+opcion+",'"+busca+"','"+busca2+"','') as (id integer,titulo text,fechaini date,fechafin date,iddepto smallint,idperiodo smallint,fechainii date,fechafini date,observ text,idstatus smallint,idsuperviso integer,fechadocto date,hora time,statusdescrip text,depadescrip character varying(80),periododesc text,supnombre character varying(50),superapp character varying(50),superapm character varying(50),noemp bigint);";
    System.out.println(texto);
            try
            {
                     rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                       jtable_modelo_prenomina.addRow(new Object[]{rs.getString("idperiodo")+":"+this.fechaeuropea(rs.getString("fechadocto"))+" "+rs.getString("hora").substring(0, 5),rs.getString("idstatus")+":"+rs.getString("statusdescrip"),rs.getString("iddepto")+":"+rs.getString("depadescrip"),rs.getString("noemp"),this.fechaeuropea(rs.getString("fechaini"))+" al "+this.fechaeuropea(rs.getString("fechafin")),rs.getString("idsuperviso")+":"+rs.getString("supnombre")+" "+rs.getString("superapp")+" "+rs.getString("superapm"),rs.getString("id")+":"+rs.getString("titulo"),rs.getString("observ")});
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }


private void carga_datos_empleado_detalle(int opcion,String textobusca)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
    while(jtable_modelo_detalleprenomina.getRowCount()>0)jtable_modelo_detalleprenomina.removeRow(0);
    String texto="select * from x1_supervision_empleados_prenomina_doctos_catalogo("+opcion+",'"+textobusca+"','','') as (id integer,iddocto integer,idempleado integer,diasnomina integer,observ text,iddepto smallint,deptodes character varying(80),empleadonom text,empfechaa date);";
    System.out.println(texto);
       try
           {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {

                        this.crea_hojempleadosaprenomina(rs.getString("idempleado"), rs.getString("iddepto")+":"+rs.getString("deptodes"),rs.getString("empleadonom"),"","","",2,rs.getString("observ"),this.fechaeuropea(rs.getString("empfechaa")));
                }
           }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
    }

private void carga_datos_empleado_detalle_mov(int opcion,String textobusca)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento

       int colu=0;
       try
           {
            rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_prenomina_doctos_catalogo("+opcion+",'"+textobusca+"','','') as (id integer,iddocto integer,idperoded smallint,cantidad numeric,ididempleado integer);",variables_global.getconexiongral());
            while (rs.next())
                {
                        colu=this.findcolumna_idperoded(rs.getString("idperoded"));
                        this.crea_hojempleadosaprenomina(rs.getString("ididempleado"),"0:0","nombre","","",rs.getString("cantidad"),colu,"","");
                }
           }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }

    }


private void crea_hojempleadosaprenomina(String idempleado,String departamento,String nombre,String horaentrada,String horasalida,String cantidad,int columna,String observacion,String fechaingreso)
    {
        int numerofilas=this.jtable_modelo_detalleprenomina.getRowCount();
        String empleadoactual[]=null,iddepto[]=null;
        int numerocolumnas=jt_detalleprenomina.getColumnModel().getColumnCount(),ii=00,encontrado=0;
        Object[] fnewRow = new Object[numerocolumnas];

       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<numerofilas;ii++)
                {
                    empleadoactual=jtable_modelo_detalleprenomina.getValueAt(ii, 1).toString().split(":");
                     if (empleadoactual[0].equals(idempleado))
                        {
                            encontrado=1;
                            jtable_modelo_detalleprenomina.setValueAt(cantidad,ii ,columna);
                        }
                }
       if(encontrado==0)
            {
                 fnewRow[0]=departamento;
                 fnewRow[1]=idempleado;
                 fnewRow[2]=nombre+"("+fechaingreso+")";
                 for(ii=3;ii<numerocolumnas;ii++)
                            {

                                        fnewRow[ii]="0";
                             }
                 fnewRow[numerocolumnas-1]=observacion;
          jtable_modelo_detalleprenomina.addRow(fnewRow);
          iddepto=departamento.split(":");

            }
    }


private void carga_datos_prenominapagos(String idpre)
        {

    int numerofilas = this.jtable_modelo_detalleprenomina.getRowCount(),ii=0;
    String selectin="";
        for( ii=0;ii<numerofilas;ii++)
                {
                if (ii>0)
                    {
                        selectin+=".";
                    }
                selectin+=""+jtable_modelo_detalleprenomina.getValueAt(ii ,1)+"";
                }

    System.out.println(selectin);

            String texto="select * from x1_supervision_empleados_p_nomina_percepodeduc(15,'"+selectin+"','"+idpre+"','') as (idreg integer,iddetalle integer,idempleado integer,percepf numeric,deducf numeric,idtipo smallint,obser text,percepnof numeric,deducnof numeric,pagof numeric,pagonof numeric,pago numeric,iddep smallint,idpatron smallint,idpatnof smallint,nombre text,fechaa date);";
            System.out.println(texto);
            String despartido[]=null,mi="",ma="";
            int columnatitulo=0;
            try
                {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                while (rs.next())
                    {

                            this.crea_hoja_prenominapago(rs.getString("idempleado"),rs.getString("pago"),3);

                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }

        }

private void carga_datos_empleadoeve(int opcion,String textobusca)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       while(jtable_modelo_empleadoe.getRowCount()>0)jtable_modelo_empleadoe.removeRow(0);
       Object[] fnewRow = new Object[3];
       String texto="select * from x1_supervision_empleadosv3("+opcion+",'"+textobusca+"','','','') as (id integer,nombre text,dom_calle character varying(80),dom_colnia character varying(80),dom_pobla character varying(50),dom_codpost character varying(10),dom_codidenti character varying(20),id_tienventas integer,id_depart smallint,id_puesto smallint,id_status smallint,id_jefeinme smallint,id_tipojor smallint,fecha_nac text,fecha_alta text,fecha_baja text,rfc character varying(18),curp character varying(20),imss character varying(20),foto character varying(80),id_causabaja smallint,id_clasif smallint,id_sexo smallint,id_tiposan smallint,id_stadocivil smallint,id_sieuno integer,id_tipocon smallint,descri_depa character varying(80),descri_puesto text,descri_status character varying(25),descri_jorna character varying(25),descri_baja character varying(25),descri_clasif character varying(25),descri_sangre character varying(25),descri_stadocivil character varying(25),descri_contrato character varying(25),telefono character varying(50),email character varying(50),asisc boolean,idare smallint,idplaz smallint,puestopla text,areap text);";
       System.out.println(texto);
       try
       {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("idplaz")+":"+rs.getString("puestopla");
                        fnewRow[1]=rs.getString("id")+":"+rs.getString("nombre");
                        fnewRow[2]=rs.getString("areap");
                        jtable_modelo_empleadoe.addRow(fnewRow);
                }
       }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
   }


private void crea_hoja_prenominapago(String codigo,String pago,int columna)
    {
        DecimalFormat miformat = new DecimalFormat("###,###,###");
        int numerofilas=this.jtable_modelo_detalleprenomina.getRowCount(),ii=00,encontrado=0;
        String mesactual="";
        float abononumerico=0;
       //invoco al metodo que trae el recordset de datos
        abononumerico=Float.valueOf(pago);
        for( ii=0;ii<numerofilas;ii++)
                {
                    mesactual=jtable_modelo_detalleprenomina.getValueAt(ii, 1).toString();
                    // System.out.println("Agregando:"+mesactual+" "+mes);
                    if (mesactual.equals(codigo))
                        {
                              jtable_modelo_detalleprenomina.setValueAt(miformat.format(abononumerico),ii ,columna);
                        }
                }
    }


private int findcolumna_idperoded (String titulo)  {
  int columnas = jtable_modelo_detalleprenomina.getColumnCount(),columencontrado=0;
  String columtitulo[]=null;
      for(int j = 0 ;j < columnas ; j++)
                {
                    columtitulo= jtable_modelo_detalleprenomina.getColumnName(j).replace("<html><b>","").split(":");
                    if(columtitulo[0].equals(titulo))
                        {
                            columencontrado=j;
                        }
                }
    return columencontrado;
}

private void contruir_totaleshe()
    {
         DecimalFormat myFormatter = new DecimalFormat("#########.##");
         float totalve=0,totalve2=0;


           for(int i=0;i<jtable_modelo_asistenciaxdiahe.getRowCount()-1;i++)
                  {
                        totalve=0;
                        for(int ii=2;ii<jtable_modelo_asistenciaxdiahe.getColumnCount();ii++)
                            {
                                totalve+=Float.valueOf(jtable_modelo_asistenciaxdiahe.getValueAt(i, ii+1).toString().replace(",","").replace(".",""));
                            }
                        //jtable_modelo_detxtie.setValueAt("<html><h3><b>"+myFormatter.format(totalve)+"</b></h3></html>",i,ii+1);
                        jtable_modelo_asistenciaxdiahe.setValueAt(""+myFormatter.format(totalve)+"",i,jtable_modelo_asistenciaxdiahe.getColumnCount());
                  }

     }

private void carga_datos_empleadopuntual(int opcion,String textobusca)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       while(jtable_modelo_empleado.getRowCount()>0)jtable_modelo_empleado.removeRow(0);
       Object[] fnewRow = new Object[8];
       try
       {
            rs = x.sieuno_executediversosv2("select * from x1_supervision_empleadosv2("+opcion+",'"+textobusca+"') as (id integer,nombre text,dom_calle character varying(80),dom_colnia character varying(80),dom_pobla character varying(50),dom_codpost character varying(10),dom_codidenti character varying(20),id_tienventas integer,id_depart smallint,id_puesto smallint,id_status smallint,id_jefeinme smallint,id_tipojor smallint,fecha_nac text,fecha_alta text,fecha_baja text,rfc character varying(18),curp character varying(20),imss character varying(20),foto character varying(80),id_causabaja smallint,id_clasif smallint,id_sexo smallint,id_tiposan smallint,id_stadocivil smallint,id_sieuno integer,id_tipocon smallint,descri_depa character varying(80),descri_puesto text,descri_status character varying(25),descri_jorna character varying(25),descri_baja character varying(25),descri_clasif character varying(25),descri_sangre character varying(25),descri_stadocivil character varying(25),descri_contrato character varying(25),telefono character varying(50),email character varying(50));",variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("id_status")+":"+rs.getString("descri_status");
                        fnewRow[1]=rs.getString("id_depart")+":"+rs.getString("descri_depa");
                        fnewRow[2]=rs.getString("id_puesto")+":"+rs.getString("descri_puesto");
                        fnewRow[3]=rs.getString("id")+":"+rs.getString("nombre");
                        //fnewRow[4]=rs.getString("dom_calle");
                        //fnewRow[5]=rs.getString("telefono");
                        //fnewRow[6]=rs.getString("email");
                        fnewRow[4]="";
                        fnewRow[5]="";
                        fnewRow[6]="";
                        fnewRow[7]=rs.getString("fecha_alta");
                        jtable_modelo_empleado.addRow(fnewRow);
                }
       }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
      
   }
private void dioclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
         String columtitulo="",idemplea="";
          this.jcmbx_asist_status.removeAllItems();
         int columna = jt_historialasistencia.getSelectedColumn();
         int fila = jt_historialasistencia.getSelectedRow();
         
         columtitulo=jt_historialasistencia.getColumnModel().getColumn(columna).getHeaderValue().toString().substring(0, 10);

         String arreglo_emple[]=this.jt_historialasistencia.getValueAt(fila, 1).toString().split(":");
         String arreglo_depa[]=this.jt_historialasistencia.getValueAt(fila, 0).toString().split(":");
         this.jtf_empleadoactualnombre.setText(this.jt_historialasistencia.getValueAt(fila, 1).toString());
         this.jftf_asist_id.setText("0");
         this.jftf_asist_idemplea.setText(arreglo_emple[0]);
         this.jftf_asist_iddepa.setText(arreglo_depa[0]);
         this.jtf_asis_fechaasis.setText(columtitulo+":"+this.DiaSemana(this.fechaamericana(columtitulo)));
         this.jtf_asis_fechasalida.setText(columtitulo+" "+this.DiaSemana(this.fechaamericana(columtitulo)));
         System.out.println("dio doble  click Sobre="+columna+"Fila:"+fila+"fecha:"+columtitulo+"empleado"+arreglo_depa[0]+arreglo_depa[1]);
         this.carga_datos_asistenciaindi(24,arreglo_emple[0], this.fechaamericana(columtitulo), "");
         this.carga_datos_asistencia_detalle(22, arreglo_emple[0], this.fechaamericana(columtitulo), "");

    }

private void dioclickeve(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:

         String columtitulo="",idemplea="";
         int fila = jt_catempleados.getSelectedRow();
         String arreglo_emple[]=this.jt_catempleados.getValueAt(fila, 1).toString().split(":");
         this.carga_datos_eventoshis(1, arreglo_emple[0], "", "");

    }

private void dioclickhe(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
         String columtitulo="",idemplea="";
          this.jcmbx_asist_status.removeAllItems();
         int columna = jt_historialasistencia1.getSelectedColumn();
        if(columna>1)
            {
                int fila = jt_historialasistencia1.getSelectedRow();


                this.jftf_he_totcolu.setText(String.valueOf(columna));
                this.jftf_he_totfila.setText(String.valueOf(fila));

                columtitulo=jt_historialasistencia1.getColumnModel().getColumn(columna).getHeaderValue().toString().substring(0, 10);
                String arreglo_emple[]=this.jt_historialasistencia.getValueAt(fila, 1).toString().split(":");
                if(JOptionPane.showConfirmDialog(null, "<html><b><h2>Desea Editar Horas Extras?<br>"+arreglo_emple[1]+"<br>Fecha:"+columtitulo+"<br>Dia:"+this.DiaSemana(this.fechaamericana(columtitulo))+"</h2></b></html>")==0)
                    {
                        this.jtf_empleadoactualnombre.setText(arreglo_emple[1]);
                        this.jtf_empleadoactualnombre1.setText(arreglo_emple[1]);
                        this.carga_datos_he_detalle(26, arreglo_emple[0],this.fechaamericana(columtitulo), "");
                        this.carga_datos_asistenciaindi(24,arreglo_emple[0], this.fechaamericana(columtitulo), "");
                        this.jftf_heempleado.setText(arreglo_emple[0]);
                        this.jtf_asis_fechaasis1.setText(columtitulo);
                        this.crea_hoja_tiposhe();
                    }
            }
        else
        {
             JOptionPane.showMessageDialog(null,"<html><b><h2>Elija la Columna de Fecha Gracias!!</h2></b></html>");
        }
    }
private void dioclickhedet(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         //System.out.println("dio doble  click");
         String idtiphe[]=null,idemplea="";
         int fila = jt_historialasistencia_detalle1.getSelectedRow();
        int columna = jt_historialasistencia1.getSelectedColumn();
        if(columna>1)
            {
                this.jftf_he_fila.setText(String.valueOf(fila));

                idtiphe=this.jt_historialasistencia_detalle1.getValueAt(fila, 0).toString().split(":");
                this.jtf_asist_boservaciones1.setText(this.jt_historialasistencia_detalle1.getValueAt(fila, 2).toString());
                this.jftf_he_autorizada.setText(this.jt_historialasistencia_detalle1.getValueAt(fila, 4).toString());
                this.jftf_he_tipohe.setText(idtiphe[0]);
                this.jftf_he_autorizada.selectAll();
                this.jftf_he_autorizada.requestFocus();

            }
    }
private void dioclicktar(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        this.jtf_tiendaactual.setText(this.jlst_clientesdistribucion.getSelectedValue().toString());

        this.jtf_tareaobs.setText(this.jlst_clientesdistribucion.getSelectedValue().toString());
        this.jtf_tareaobs.selectAll();
        this.jtf_tareaobs.requestFocus();
    }

private void dioclickpre(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
           int fila = jt_catprenominas.getSelectedRow();
           String idpre[]=this.jtable_modelo_prenomina.getValueAt(fila, 6).toString().split(":");
           String idpe[]=this.jtable_modelo_prenomina.getValueAt(fila, 0).toString().split(":");
           String idpat[]=this.jtable_modelo_prenomina.getValueAt(fila, 2).toString().split(":");
           this.carga_datos_empleado_detalle(1,idpre[0]);
      this.carga_datos_empleado_detalle_mov(2,idpre[0]);
      this.carga_datos_prenominapagos(idpe[0]);
      this.jtf_idpat.setText(idpat[0]);
      this.jlbl_periodo.setText("PERIODO CORRESPONDIENTE AL:"+this.jtable_modelo_prenomina.getValueAt(fila, 4).toString());
      this.jtf_prenominaactual.setText("PERIODO CORRESPONDIENTE AL:"+this.jtable_modelo_prenomina.getValueAt(fila, 4).toString());
                                   try
                                {
                                    rs = x.sieuno_executediversosv2("select * from x1_supervision_departamentos_catalogo(2,'"+this.jtf_idpat.getText()+"','','') as (id smallint);",variables_global.getconexiongral());
                                    while (rs.next())
                                        {
                                            this.jtf_idpat1.setText(rs.getString("id"));
                                        }
                                }
                                        catch(Exception e)
                                        {
                                            System.out.println(e.getMessage());
                                        }
                                    try
                                        {
                                            rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_patron(11,'"+this.jtf_idpat1.getText()+"','','','') as (idraz smallint,nombre character varying(60),dir character varying(50),col character varying(50),pob character varying(40),cp character varying(6),rfc character varying(15),regpat text,obs text);",variables_global.getconexiongral());
                                            while (rs.next())
                                                {
                                                    this.jlbl_patron.setText(rs.getString("nombre"));
                                                     this.jlbl_patrondir.setText("Direccion:"+rs.getString("dir")+" "+rs.getString("col"));
                                                      this.jlbl_nrp.setText("N.R.P."+rs.getString("regpat"));
                                                        this.jlbl_rfc.setText("R.F.C:"+rs.getString("rfc"));
                                                    //jtable_modelo_patrones.addRow(new Object[]{rs.getString("idraz"),rs.getString("nombre"),rs.getString("rfc"),rs.getString("regpat"),rs.getString("obs"),"0","0","0"});
                                                }
                                        }
                                        catch(Exception e)
                                        {
                                            System.out.println(e.getMessage());
                                        }
                        this.carga_datos_empleado_x_patrondetalle1nof(20, this.jtf_idpat1.getText(), this.jtf_idperactua.getText(),"0");
                        this.carga_datos_empleado_x_patron_movdetnof1(6, this.jtf_idpat1.getText(), this.jtf_idperactua.getText());

                         this.carga_datos_empleado_x_patrondetalle2(21, this.jtf_idpat1.getText(), this.jtf_idperactua.getText(),"0");
                        this.carga_datos_empleado_x_patron_movdet2(6, this.jtf_idpat1.getText(), this.jtf_idperactua.getText());
    }

private void dioclickpreprin(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
           int fila = jt_catprenominas.getSelectedRow();

           String idpe[]=this.jtable_modelo_prenomina.getValueAt(fila, 2).toString().split(":");
           String idpeid[]=this.jtable_modelo_prenomina.getValueAt(fila, 0).toString().split(":");
        supervision_rh_prenomina_print fsrhp=new supervision_rh_prenomina_print(idpeid[0],idpe[0],4,this.jtable_modelo_prenomina.getValueAt(fila, 4).toString(),"","","","");
        fsrhp.pack();
        fsrhp.setVisible(true);

    }


private void dioclickper(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
            int fila = jt_periodos.getSelectedRow();
            this.jtf_idperactua.setText(this.jtable_modelo_periodo.getValueAt(fila, 0).toString());
            this.jtf_periododescribe.setText(this.jtable_modelo_periodo.getValueAt(fila, 1).toString());
            this.carga_datos_prenominas(6, textobuscadepa,this.jtable_modelo_periodo.getValueAt(fila, 0).toString());
    
}

private void diodblclickp(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
   if (variables_global.getnivelusu() == 3)
            {
                    JPasswordField pwd = new JPasswordField(10);
                    int action = JOptionPane.showConfirmDialog(null, pwd,"Contraseña:(Use Tab p/moverse o Mause)",JOptionPane.OK_CANCEL_OPTION);
                    if(action < 0)
                        {
                            JOptionPane.showMessageDialog(null,"No se realiza Proceso, Gracias");
                        }
                    else
                        {
                            if(variables_global.getPassword().equals(String.valueOf(pwd.getPassword())))
                                {
                                     System.out.println("dio doble  click");
                                     int fila = jt_resumenxstatus1.getSelectedRow();
                                   
                                     String idcadenaemp=this.jtable_modelo_empleado.getValueAt(fila, 0).toString();
                                     //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
                                     supervision_rh_edita fsrhe=new supervision_rh_edita(Integer.valueOf(idcadenaemp),3);
                                     fsrhe.pack();
                                     fsrhe.setVisible(true);
                                }
                        }

               //this.carga_datos_detalleinve(ftienda, ffoliopadre,1,idcadena);
            }
        if (variables_global.getnivelusu() < 3)
            {
                System.out.println("dio doble  click");
                int fila = jt_resumenxstatus1.getSelectedRow();
               
                String idcadenaemp=this.jtable_modelo_empleado.getValueAt(fila, 0).toString();
//                JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
                supervision_rh_edita fsrhe=new supervision_rh_edita(Integer.valueOf(idcadenaemp),3);
                fsrhe.pack();
                fsrhe.setVisible(true);
            }
    }
private void dioclickevein(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:

         String columtitulo="",idemplea="";
         int fila = jt_catempleados1.getSelectedRow();
         String arreglo_emple[]=this.jtable_modelo_empleadoe.getValueAt(fila, 1).toString().split(":");
         String arreglo_emple2[]=this.jtable_modelo_empleadoe.getValueAt(fila, 0).toString().split(":");
         this.jftf_asist_idemplea1.setText(arreglo_emple[0]);
         this.jtf_empleadoactualnombre2.setText(arreglo_emple[1]);
         this.jftf_asist_idemplea2.setText(arreglo_emple2[0]);
         this.jtf_empleadoactualnombre3.setText(this.jtable_modelo_empleadoe.getValueAt(fila, 0).toString());
         this.jtf_empleadoactualnombre4.setText(this.jtable_modelo_empleadoe.getValueAt(fila, 2).toString());

    }

void LimpiarJTable()
{
     //limpiar la tabla
    while(this.jtable_modelo.getRowCount()>0)this.jtable_modelo.removeRow(0);

 System.out.println("gee"+jtable_modelo.getColumnCount());
 int columna=jtb_asitencia.getColumnModel().getColumnCount();
   for(int j = 2 ;j < columna ; j++)
                {
                    System.out.println("viendo"+this.jtb_asitencia.getColumnModel().getColumnCount());
                    if (jtable_modelo.getColumnCount() > 2)
                        {
                             jtb_asitencia.removeColumn(jtb_asitencia.getColumnModel().getColumn(2));
                             System.out.println("Elimino, elimino, elimino"+this.jtb_asitencia.getColumnModel().getColumnCount());
                             //TableColumn tcol = jtb_asitencia.getColumnModel().getColumn(2);
                             // jtb_asitencia.removeColumn(tcol);
                         }
                }
}

private void carga_datos_empleado_x_patrondetalle1nof(int opcion,String textobusca,String textobusca2,String busca3)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
    int ii=0,numerofilas=0,encontrado=0;
    String epleadoactual="",empleadoactual="",texto="select * from x1_supervision_empleados_p_nomina_percepodeduc("+opcion+",'"+textobusca+"','"+textobusca2+"','"+busca3+"') as (idreg integer,iddetalle integer,idempleado integer,percepf numeric,deducf numeric,idtipo smallint,obser text,percepnof numeric,deducnof numeric,pagof numeric,pagonof numeric,pago numeric,iddep smallint,idpatron smallint,idpatnof smallint,nombre text,fechai date,fechaa date,rfc character varying (20),curp character varying (20),imss character varying (20),idtipoc smallint,sueldo1 numeric,sueldo2 numeric,sueldo3 numeric,sueldo4 numeric);";
    DecimalFormat myFormat = new DecimalFormat("############.##");
     DecimalFormat myFormat2 = new DecimalFormat("############.##");

      while(jtable_modelo_reportef.getRowCount()>0)jtable_modelo_reportef.removeRow(0);

      Object[] fnewRow = new Object[10];
      System.out.println(texto);
       try
           {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                 if(rs.getFloat("pagonof")>0)
                    {
                                fnewRow[0]=""+rs.getString("idempleado")+":"+rs.getString("nombre")+""; //nombre
                                fnewRow[1]=this.fechaeuropea(rs.getString("fechai"));//F. Ingreso
                                fnewRow[2]="0";//sueldo
                                fnewRow[3]="0";//Horas extras
                                fnewRow[4]="0";//Bono de Apoyo
                                fnewRow[5]="0";//Descanso trabajado
                                fnewRow[6]="0";//Dia Festivo
                                fnewRow[7]="0";//prima dom
                                fnewRow[8]=myFormat2.format(rs.getFloat("pagonof"));//Neto a pagar
                                fnewRow[9]="";//Firmas
                              jtable_modelo_reportef.addRow(fnewRow);
                 }

                }
           }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
                                fnewRow[0]=""; //nombre
                                fnewRow[1]="";//F. Ingreso
                                fnewRow[2]="";//sueldo
                                fnewRow[3]="";//Horas extras
                                fnewRow[4]="";//Bono de Apoyo
                                fnewRow[5]="";//Descanso trabajado
                                fnewRow[6]="";//Dia Festivo
                                fnewRow[7]="";//prima dom
                                fnewRow[8]="";//Neto a pagar
                                fnewRow[9]="";//Firmas
       jtable_modelo_reportef.addRow(fnewRow);
    }
private void carga_datos_empleado_x_patron_movdetnof1(int opcion,String textobusca,String periodo)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       Object[] fnewRow = new Object[8];
       DecimalFormat myFormat = new DecimalFormat("############.##");
       String texto="select * from x1_supervision_empleados_p_nomina_percepodeduc("+opcion+",'"+textobusca+"','"+periodo+"','0') as (idreg integer,iddetalle integer,idperoded smallint,cantidad numeric,idempleado integer,salario numeric,factor numeric,importe numeric,iddep smallint);";
       System.out.println(texto);
       try
           {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        switch (rs.getInt("idperoded")) {
                            case 8:
                                    this.crea_hojempleadosaprenominanof(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),2,rs.getInt("idperoded"));//sueldo

                            break;
                              case 9:
                                    this.crea_hojempleadosaprenominanof(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),3,rs.getInt("idperoded"));//bono de apoyo
                            break;
                            case 11:
                                    this.crea_hojempleadosaprenominanof(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),4,rs.getInt("idperoded"));//bono de apoyo
                            break;
                            case 10:
                                    this.crea_hojempleadosaprenominanof(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),5,rs.getInt("idperoded"));//descanso trabajado
                            break;
                            case 12:
                                    this.crea_hojempleadosaprenominanof(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),6,rs.getInt("idperoded"));//dia festivo
                            break;
                           case 14:
                                    this.crea_hojempleadosaprenominanof(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),7,rs.getInt("idperoded"));//Prima dominical
                            break;


        }

                }
           }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
       this.calcular_totalesnof();
    }
private void crea_hojempleadosaprenominanof(String idempleado,String importe,int columna,int pod)
    {
        int ii=0;
        String empleadoactual[]=null;
          DecimalFormat myFormat = new DecimalFormat("############.##");
        float sueldo=0;
       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<this.jtable_modelo_reportef.getRowCount()-1;ii++)
                {
                    empleadoactual=jtable_modelo_reportef.getValueAt(ii, 0).toString().replace("<html>", "").split(":");
                     if (empleadoactual[0].equals(idempleado))
                        {
                            //if(pod==14)
                            //        {
                            //            sueldo=Float.valueOf(jtable_modelo_reportef.getValueAt(ii, 2).toString());
                            //            jtable_modelo_reportef.setValueAt(myFormat.format(Float.valueOf(importe)+sueldo),ii ,2);
                            //        }
                            //else
                            jtable_modelo_reportef.setValueAt(importe,ii ,columna);
                        }
                }

    }
private void calcular_totalesnof()
    {
        System.out.println("modifico y a calcular");
        DecimalFormat myFormat = new DecimalFormat("###,###,######.##");
        int numerofilas=0,error=0,i=0,pod=0,j=0;
        float factor=0,importe=0,cantidad=0,importef=0,importenof=0;

        for(j = 2 ;j < 9; j++)
        {
            importef=0;
         for(i = 0 ;i < this.jtable_modelo_reportef.getRowCount()-1; i++)
                                {
                                    importef+=Float.valueOf(this.jtable_modelo_reportef.getValueAt(i, j).toString());
                                }
        jtable_modelo_reportef.setValueAt(myFormat.format(importef),this.jtable_modelo_reportef.getRowCount()-1 ,j);
        }

  }

private void calcular_horastrab() throws ParseException
    {
        String fechai[]=this.jtf_asis_fechaasis.getText().split(":");
        Date hora1 = formateadorht.parse(""+fechai[0]+" "+this.jtf_asist_horaent_pro.getText()+"");
        Date hora2 = formateadorht.parse(""+fechai[0]+" "+this.jftf_asist_salidaprog.getText()+"");

        Date hora3 = formateadorht.parse(""+fechai[0]+" "+this.jtf_asist_horaen_dcom.getText()+"");
        Date hora4 = formateadorht.parse(""+fechai[0]+" "+this.jtf_asist_horasa_dcom.getText()+"");

        long lantes = hora1.getTime();
        long lahora = hora2.getTime();

         long lantes2 = hora3.getTime();
        long lahora2 = hora4.getTime();

         System.out.println("hora1"+hora1.getTime());
         System.out.println("hora2"+hora2.getTime());
        long diferencia = (lahora-lantes)+(lahora2-lantes2);
        long segundos = diferencia / 1000;
    long horas = segundos / 3600;
    segundos -= horas * 3600;
    long minutos = segundos / 60;
    segundos -= minutos * 60;
    this.jftf_asist_horaentrada2.setText(horas+":"+minutos);
  }
private void calcular_totalespuntual()
    {
        System.out.println("modifico y a calcular");
        DecimalFormat myFormat = new DecimalFormat("#########");
        int i=0;
        float dias=0;


         for(i = 0 ;i < this.jtable_modelo_empleado.getRowCount(); i++)
                                {
                                    dias=Float.valueOf(this.jtable_modelo_empleado.getValueAt(i, 5).toString())+Float.valueOf(this.jtable_modelo_empleado.getValueAt(i, 6).toString())+Float.valueOf(this.jtable_modelo_empleado.getValueAt(i, 7).toString())+Float.valueOf(this.jtable_modelo_empleado.getValueAt(i, 8).toString())+Float.valueOf(this.jtable_modelo_empleado.getValueAt(i, 9).toString());
                                    jtable_modelo_empleado.setValueAt(myFormat.format(dias),i,10);
                                }



  }
    private void imprimir(int pag,float ptotal)
    {
            this.objimpresora=new supervision_rh_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("       "+this.jlbl_patron.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("       "+this.jlbl_patrondir.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("       "+this.jlbl_rfc.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("       "+this.jlbl_nrp.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("       "+this.jlbl_periodo.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Folio Tienda:"+this.tf_foliotienda.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Status Documento:"+this.tf_status.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Cliente o Tienda:"+this.tf_cliente.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.ta_observaciones.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_detalleprenomina1);
     this.objimpresora.imprimir_all(1,pag);
    }
 private void imprimirf(int pag,float ptotal)
    {
            this.objimpresora=new supervision_rh_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("                      "+this.jlbl_patron.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("                      "+this.jlbl_patrondir.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("                      "+this.jlbl_rfc.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("                      "+this.jlbl_nrp.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("                      "+this.jlbl_periodo.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Folio Tienda:"+this.tf_foliotienda.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Status Documento:"+this.tf_status.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Cliente o Tienda:"+this.tf_cliente.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.ta_observaciones.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_detalleprenomina2);
     this.objimpresora.imprimir_all(2,pag);
    }

 private void imprimir_puntual(int pag,float ptotal)
    {
     this.objimpresora=new supervision_rh_imprimir();
     this.objimpresora.setOneItem_cadenas_a_imprimir("      Id-Rep:RH-A1                S.I.:Asistencia y Puntualidad");
     this.objimpresora.setOneItem_cadenas_a_imprimir("      Fecha Reporte"+this.jtf_fechaini.getText()+"   Fecha Fin:"+this.jtf_fechafin.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("      Usuario:"+variables_global.getNombre()+" Fecha:"+this.fechaeuropea(fechahoy));
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setOneItem_cadenas_a_imprimir("      Pagina: "+(pag+1)+" de"+ptotal);
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_resumenxstatus1);
     this.objimpresora.imprimir_all(3,pag);
    }

 private void imprimir_he(int pag,float ptotal)
    {
            this.objimpresora2=new supervision_rh_asistencia_xdia_imp();

            this.objimpresora2.setMargen(Integer.valueOf(this.jtf_margen.getText().toString()));
            String inter[]=this.jcmbx_interlineado.getSelectedItem().toString().split(":");
            this.objimpresora2.setInterlineado(Integer.valueOf(inter[0]));
            this.objimpresora2.setOneItem_cadenas_a_imprimir("       S.I RH (reporte de horas hextras)");
            this.objimpresora2.setOneItem_cadenas_a_imprimir("       Departamento:"+this.jtf_buscarenjtable1.getText());
            this.objimpresora2.setOneItem_cadenas_a_imprimir("       Fecha Inicial:"+this.jtf_fechaini.getText()+" Fecha Final:"+this.jtf_fechafin.getText());
    this.objimpresora2.setOneItem_cadenas_a_imprimir("       Fecha Impresion:"+this.fechaeuropea(fechahoy)+" Hora:"+fechahoy.getHours()+":"+fechahoy.getMinutes()+"  Usuario:"+variables_global.getNombre());
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Folio Tienda:"+this.tf_foliotienda.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Status Documento:"+this.tf_status.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Cliente o Tienda:"+this.tf_cliente.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.ta_observaciones.getText()+"");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora2.setObjeto_tabla(jt_historialasistencia1);
     this.objimpresora2.imprimir_all(1,pag);
    }

 private void imprimir_heasistencia(int pag,float ptotal)
    {
            this.objimpresora2=new supervision_rh_asistencia_xdia_imp();

            this.objimpresora2.setMargen(Integer.valueOf(this.jtf_margen.getText().toString()));
            this.objimpresora2.setPagxhoja(Integer.valueOf(this.jtf_asilinxhoja.getText().toString()));
            String inter[]=this.jcmbx_interlineado.getSelectedItem().toString().split(":");
            this.objimpresora2.setInterlineado(Integer.valueOf(inter[0]));
            this.objimpresora2.setOneItem_cadenas_a_imprimir("       S.I RH (reporte de horas hextras en base a Checador)");
            this.objimpresora2.setOneItem_cadenas_a_imprimir("       Departamento:"+this.jtf_buscarenjtable1.getText());
            this.objimpresora2.setOneItem_cadenas_a_imprimir("       Fecha Inicial:"+this.jtf_fechaini.getText()+" Fecha Final:"+this.jtf_fechafin.getText());
            this.objimpresora2.setOneItem_cadenas_a_imprimir("       Fecha Impresion:"+this.fechaeuropea(fechahoy)+" Hora:"+fechahoy.getHours()+":"+fechahoy.getMinutes()+"  Usuario:"+variables_global.getNombre());
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Folio Tienda:"+this.tf_foliotienda.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Status Documento:"+this.tf_status.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Cliente o Tienda:"+this.tf_cliente.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.ta_observaciones.getText()+"");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
      System.out.println("paginas"+pag + " de "+ptotal);
     this.objimpresora2.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag +"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora2.setObjeto_tabla(jt_historialasistencia);
     this.objimpresora2.imprimir_all(2,pag);
    }

private void carga_datos_empleado_x_patrondetalle2(int opcion,String textobusca,String textobusca2,String textobusca3)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
    int ii=0,numerofilas=0,encontrado=0;
    String epleadoactual="",empleadoactual="",texto="select * from x1_supervision_empleados_p_nomina_percepodeduc("+opcion+",'"+textobusca+"','"+textobusca2+"','"+textobusca3+"') as (idreg integer,iddetalle integer,idempleado integer,percepf numeric,deducf numeric,idtipo smallint,obser text,percepnof numeric,deducnof numeric,pagof numeric,pagonof numeric,pago numeric,iddep smallint,idpatron smallint,idpatnof smallint,nombre text,fechai date,fechaa date,rfc character varying (20),curp character varying (20),imss character varying (20),idtipoc smallint,sueldo1 numeric,sueldo2 numeric,sueldo3 numeric,sueldo4 numeric);";
    DecimalFormat myFormat = new DecimalFormat("############.##");
     DecimalFormat myFormat2 = new DecimalFormat("############.##");
      Object[] fnewRow = new Object[this.jtable_modelo_reportef2.getColumnCount()];
    while(jtable_modelo_reportef2.getRowCount()>0)jtable_modelo_reportef2.removeRow(0);
      System.out.println(texto);
       try
           {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                     if(rs.getFloat("pagof")>0)
                        {
                                fnewRow[0]=""+rs.getString("idempleado")+":"+rs.getString("nombre")+" "+rs.getString("imss")+""; //nombre y afiliacion
                                fnewRow[1]=" "+rs.getString("curp")+"/"+rs.getString("rfc")+"";;//crup y rfc
                                fnewRow[2]="8 Hrs"; //duracion
                                fnewRow[3]=this.fechaeuropea(rs.getString("fechaa"));//F. Ing. Traba
                                fnewRow[4]="Fijo";//t.salario
                                fnewRow[5]="0";//dias trabajados
                                fnewRow[6]=myFormat.format(rs.getFloat("sueldo2"));//salario base de cotizacion
                                fnewRow[7]=myFormat.format(rs.getFloat("sueldo3"));//sueldo
                                fnewRow[8]="0";//sueldo
                                fnewRow[9]="0";//Vales de Despensa
                                fnewRow[10]="0";//prima dominical
                                fnewRow[11]="0";//subtotal
                                fnewRow[12]="0";//subsidio empleado
                                fnewRow[13]=myFormat.format(rs.getFloat("percepf"));//total percepciones
                                fnewRow[14]="0";//isr sueldos
                                fnewRow[15]="0";//IMSS
                                fnewRow[16]="0";//Infonavit
                                fnewRow[17]=myFormat.format(rs.getFloat("deducf"));//Total deducciones
                                fnewRow[18]=myFormat2.format(rs.getFloat("pagof"));//Neto a pagar
                                fnewRow[19]="";//Firmas
                              jtable_modelo_reportef2.addRow(fnewRow);
                     }

                }
           }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
                                fnewRow[0]=""; //nombre y afiliacion
                                fnewRow[1]=" ";//crup y rfc
                                fnewRow[2]=""; //duracion
                                fnewRow[3]="";//F. Ing. Traba
                                fnewRow[4]="";//t.salario
                                fnewRow[5]="";//dias trabajados
                                fnewRow[6]="";//salario base de cotizacion
                                fnewRow[7]="";//sueldo
                                fnewRow[8]="";//sueldo
                                fnewRow[9]="";//Vales de Despensa
                                fnewRow[10]="";//prima dominical
                                fnewRow[11]="";//subtotal
                                fnewRow[12]="";//subsidio empleado
                                fnewRow[13]="";//total percepciones
                                fnewRow[14]="";//isr sueldos
                                fnewRow[15]="";//IMSS
                                fnewRow[16]="";//Infonavit
                                fnewRow[17]="";//Total deducciones
                                fnewRow[18]="";//Neto a pagar
                                fnewRow[19]="";//Firmas
                              jtable_modelo_reportef2.addRow(fnewRow);
    }
private void carga_datos_empleado_x_patron_movdet2(int opcion,String textobusca,String periodo)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       Object[] fnewRow = new Object[8];
       DecimalFormat myFormat = new DecimalFormat("############.##");
       String texto="select * from x1_supervision_empleados_p_nomina_percepodeduc("+opcion+",'"+textobusca+"','"+periodo+"','0') as (idreg integer,iddetalle integer,idperoded smallint,cantidad numeric,idempleado integer,salario numeric,factor numeric,importe numeric,iddep smallint);";
       System.out.println(texto);
       try
           {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        switch (rs.getInt("idperoded")) {
                            case 1:
                                    this.crea_hojempleadosaprenomina(rs.getString("idempleado"),myFormat.format(rs.getFloat("cantidad")),5);//dias trabajados
                                    this.crea_hojempleadosaprenomina(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),8);//sueldo

                            break;
                            case 13:
                                    this.crea_hojempleadosaprenomina(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),9);//vales de despensa
                            break;
                            case 2:
                                    this.crea_hojempleadosaprenomina(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),10); //prima dominical
                            break;

                            case 4:
                                    this.crea_hojempleadosaprenomina(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),12);//subcidio al empleado //subtotal
                            break;
                            case 5:
                                    this.crea_hojempleadosaprenomina(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),14); //isr
                            break;
                            case 6:
                                    this.crea_hojempleadosaprenomina(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),15);//imss
                            break;
                            
                            case 7:
                                    this.crea_hojempleadosaprenomina(rs.getString("idempleado"),myFormat.format(rs.getFloat("importe")),16);//infonavit
                            break;


        }

                }
           }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
              this.calcular_totales2();
    }
private void crea_hojempleadosaprenomina(String idempleado,String importe,int columna)
    {
        int ii=0;
        String empleadoactual[]=null;

       //invoco al metodo que trae el recordset de datos
        for( ii=0;ii<this.jtable_modelo_reportef2.getRowCount()-1;ii++)
                {
                    empleadoactual=jtable_modelo_reportef2.getValueAt(ii, 0).toString().replace("<html>", "").split(":");
                     if (empleadoactual[0].equals(idempleado))
                        {
                            jtable_modelo_reportef2.setValueAt(importe,ii ,columna);
                        }
                }

    }

 private void calcular_totales2()
    {
        System.out.println("modifico y a calcular");
        DecimalFormat myFormat = new DecimalFormat("###,###,######.##");
        int numerofilas=0,error=0,i=0,pod=0,j=0;
        float factor=0,importe=0,cantidad=0,importef=0,importenof=0;
        for(i = 0 ;i < this.jtable_modelo_reportef2.getRowCount()-1; i++)
                                {
                                    jtable_modelo_reportef2.setValueAt(myFormat.format(Float.valueOf(this.jtable_modelo_reportef2.getValueAt(i, 13).toString())-Float.valueOf(this.jtable_modelo_reportef2.getValueAt(i, 12).toString())),i ,11);
                                }
        for(j = 8 ;j < 19; j++)
        {
            importef=0;
         for(i = 0 ;i < this.jtable_modelo_reportef2.getRowCount()-1; i++)
                                {
                                    importef+=Float.valueOf(this.jtable_modelo_reportef2.getValueAt(i, j).toString());
                                }
        jtable_modelo_reportef2.setValueAt(myFormat.format(importef),this.jtable_modelo_reportef2.getRowCount()-1 ,j);
        }

  }
private void loadcombo_interlineado()
 {
            this.jcmbx_interlineado.addItem("1"+":"+"Doble");
            this.jcmbx_interlineado.addItem("0"+":"+"Sencillo");
            this.jcmbx_interlineado.addItem("2"+":"+"Triple");
    }


private void exportar_archivo()
    {
        float tot=0;
        java.util.Date fechahoyre=new Date();
        String archivon="Reportehe_"+this.fechaeuropea(fechahoy)+"Hora_"+fechahoyre.getHours()+"_"+fechahoyre.getMinutes();
        FileWriter fichero = null;
        PrintWriter pw = null;
        Object jtunidad=JOptionPane.showInputDialog(null,"Ingresa Unidad:","Unidades",JOptionPane.QUESTION_MESSAGE,null,new Object[] { "C", "D", "E","F","G","H" },"C");
        String texto="",anterior="";
        try
        {
            fichero = new FileWriter(jtunidad.toString()+":/"+archivon+".csv");
            pw = new PrintWriter(fichero);
            texto="Reporte de Horas Extras:,"+this.fechaeuropea(this.jdc_fechainicial.getDate())+", a ,"+this.fechaeuropea(this.jdc_fechafinal.getDate());
            pw.println(texto);
            texto="Usuario:,"+variables_global.getNombre()+",Hora:,"+fechahoyre.getHours()+":"+fechahoyre.getMinutes();
            pw.println(texto);
            texto="Nombre,";
            for(int i = 2 ;i < this.jtable_modelo_asistenciaxdiahe.getColumnCount(); i++)
                            {
                             if (i>2)
                                    {
                                        texto+=",";
                                    }
                                texto+=""+jt_historialasistencia1.getColumnModel().getColumn(i).getHeaderValue().toString().substring(0,10)+"";
                            }
            if(hedet==0)
                {
                    texto+=",Total";
                }
                        pw.println(texto);
                        texto="";
            for(int j = 0 ;j < this.jtable_modelo_asistenciaxdiahe.getRowCount(); j++)
                        {
                        texto=jtable_modelo_asistenciaxdiahe.getValueAt(j ,1).toString();
                        tot=0;
                        for(int i = 2 ;i < this.jtable_modelo_asistenciaxdiahe.getColumnCount(); i++)
                            {
                             
                                texto+=","+jtable_modelo_asistenciaxdiahe.getValueAt(j ,i)+"";
                                if(hedet==0)
                                    {
                                        tot+=Float.valueOf(this.jtable_modelo_asistenciaxdiahe.getValueAt(j,i).toString());
                                    }
                            }

                            if(hedet==0)
                                {
                                    texto+=","+String.valueOf(tot);
                                }
                            pw.println(texto);
                        }



        } catch (Exception e) {
            e.printStackTrace();
        } finally {
           try {
           // Nuevamente aprovechamos el finally para
           // asegurarnos que se cierra el fichero.
           if (null != fichero)
              fichero.close();
                JOptionPane.showMessageDialog(null,"Archivo correcto "+jtunidad.toString()+":/"+archivon+".csv", "Sistema Integral(R.H. Horas Extras)",1);
           } catch (Exception e2) {
              e2.printStackTrace();
           }
        }
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel6 = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jScrollPane10 = new javax.swing.JScrollPane();
        jt_historialasistencia = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jPanel15 = new javax.swing.JPanel();
        jScrollPane11 = new javax.swing.JScrollPane();
        jt_historialasistencia_detalle = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jLabel35 = new javax.swing.JLabel();
        jtf_asis_fechaasis = new javax.swing.JTextField();
        jLabel36 = new javax.swing.JLabel();
        jcmbx_asist_status = new javax.swing.JComboBox();
        jftf_asist_horaentrada = new javax.swing.JFormattedTextField();
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jftf_asist_horasalida = new javax.swing.JFormattedTextField();
        jLabel39 = new javax.swing.JLabel();
        jbtn_asistenciarev = new javax.swing.JButton();
        jftf_asist_id = new javax.swing.JFormattedTextField();
        jbtn_asist_guardarcambios = new javax.swing.JButton();
        jftf_asist_idemplea = new javax.swing.JFormattedTextField();
        jftf_asist_iddepa = new javax.swing.JFormattedTextField();
        jbtn_detalleempleado = new javax.swing.JButton();
        jLabel40 = new javax.swing.JLabel();
        jtf_asist_horaent_pro = new javax.swing.JFormattedTextField();
        jLabel41 = new javax.swing.JLabel();
        jftf_asist_salidaprog = new javax.swing.JFormattedTextField();
        jLabel42 = new javax.swing.JLabel();
        jtf_asist_horaen_dcom = new javax.swing.JFormattedTextField();
        jLabel43 = new javax.swing.JLabel();
        jtf_asist_horasa_dcom = new javax.swing.JFormattedTextField();
        jLabel44 = new javax.swing.JLabel();
        jtf_minutoscomida = new javax.swing.JTextField();
        jLabel45 = new javax.swing.JLabel();
        jtf_asis_fechasalida = new javax.swing.JTextField();
        jtf_horastrabajadas = new javax.swing.JTextField();
        jLabel47 = new javax.swing.JLabel();
        jtf_asist_boservaciones = new javax.swing.JTextField();
        jlbl_describepuntualidad = new javax.swing.JLabel();
        jLabel49 = new javax.swing.JLabel();
        jftf_asist_horaentrada1 = new javax.swing.JFormattedTextField();
        jLabel50 = new javax.swing.JLabel();
        jftf_asist_horaentrada2 = new javax.swing.JFormattedTextField();
        jLabel51 = new javax.swing.JLabel();
        jtf_minutoscomida1 = new javax.swing.JTextField();
        jdc_fechanomina = new com.toedter.calendar.JDateChooser();
        jbtn_asist_guardarcambios1 = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        jlst_clientesdistribucion = new javax.swing.JList();
        jbtn_asistenciarev1 = new javax.swing.JButton();
        jtf_tiendaactual = new javax.swing.JTextField();
        jtf_idtar = new javax.swing.JTextField();
        jckb_noeliminar1 = new javax.swing.JCheckBox();
        jtf_empleadoactualnombre = new javax.swing.JTextField();
        jtf_tareaobs = new javax.swing.JTextField();
        jLabel48 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtb_asitencia = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }}
            ;
            jLabel12 = new javax.swing.JLabel();
            jrbtn_columnadepartamento = new javax.swing.JRadioButton();
            jrbtn_empleado = new javax.swing.JRadioButton();
            jLabel13 = new javax.swing.JLabel();
            jtf_buscarenjtable = new javax.swing.JTextField();
            jlb_resultado = new javax.swing.JLabel();
            jtf_buscarenjtable1 = new javax.swing.JTextField();
            jPanel4 = new javax.swing.JPanel();
            jScrollPane13 = new javax.swing.JScrollPane();
            jt_resumenxstatus = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jPanel13 = new javax.swing.JPanel();
            jPanel14 = new javax.swing.JPanel();
            jScrollPane14 = new javax.swing.JScrollPane();
            jt_resumenxstatus1 = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jtf_fechaini = new javax.swing.JTextField();
            jLabel15 = new javax.swing.JLabel();
            jLabel16 = new javax.swing.JLabel();
            jtf_fechafin = new javax.swing.JTextField();
            jbtn_imprimirpuntuali = new javax.swing.JButton();
            jrbtn_ordenmrm = new javax.swing.JRadioButton();
            jrbtn_ordendepa = new javax.swing.JRadioButton();
            jLabel17 = new javax.swing.JLabel();
            jPanel16 = new javax.swing.JPanel();
            jPanel17 = new javax.swing.JPanel();
            jScrollPane12 = new javax.swing.JScrollPane();
            jt_historialasistencia1 = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jPanel18 = new javax.swing.JPanel();
            jScrollPane17 = new javax.swing.JScrollPane();
            jt_historialasistencia_detalle1 = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jLabel52 = new javax.swing.JLabel();
            jftf_he_autorizada = new javax.swing.JFormattedTextField();
            jLabel53 = new javax.swing.JLabel();
            jtf_asist_boservaciones1 = new javax.swing.JTextField();
            jbtn_guardarhe = new javax.swing.JButton();
            jLabel46 = new javax.swing.JLabel();
            jftf_asist_horaentrada3 = new javax.swing.JFormattedTextField();
            jLabel54 = new javax.swing.JLabel();
            jftf_asist_horasalida1 = new javax.swing.JFormattedTextField();
            jlbl_describepuntualidad1 = new javax.swing.JLabel();
            jLabel55 = new javax.swing.JLabel();
            jtf_horastrabajadas1 = new javax.swing.JTextField();
            jLabel56 = new javax.swing.JLabel();
            jtf_minutoscomida2 = new javax.swing.JTextField();
            jckb_noeliminar2 = new javax.swing.JCheckBox();
            jftf_heempleado = new javax.swing.JFormattedTextField();
            jftf_he_tipohe = new javax.swing.JFormattedTextField();
            jftf_he_fila = new javax.swing.JFormattedTextField();
            jftf_he_totcolu = new javax.swing.JFormattedTextField();
            jftf_he_totfila = new javax.swing.JFormattedTextField();
            jPanel19 = new javax.swing.JPanel();
            jtf_empleadoactualnombre1 = new javax.swing.JTextField();
            jtf_asis_fechaasis1 = new javax.swing.JTextField();
            jtf_hestatus = new javax.swing.JTextField();
            jPanel23 = new javax.swing.JPanel();
            jPanel25 = new javax.swing.JPanel();
            jdc_fechainicial2 = new com.toedter.calendar.JDateChooser();
            jLabel18 = new javax.swing.JLabel();
            jdc_fechafinal2 = new com.toedter.calendar.JDateChooser();
            jLabel19 = new javax.swing.JLabel();
            jcmbx_asist_status1 = new javax.swing.JComboBox();
            jLabel57 = new javax.swing.JLabel();
            jtf_empleadoactualnombre2 = new javax.swing.JTextField();
            jLabel20 = new javax.swing.JLabel();
            jftf_asist_idemplea1 = new javax.swing.JTextField();
            jtf_empleadoactualnombre3 = new javax.swing.JTextField();
            jLabel21 = new javax.swing.JLabel();
            jLabel22 = new javax.swing.JLabel();
            jtf_empleadoactualnombre4 = new javax.swing.JTextField();
            jbtn_busqudainsi1 = new javax.swing.JButton();
            jtf_insidenciabusqueda1 = new javax.swing.JTextField();
            jLabel23 = new javax.swing.JLabel();
            jLabel24 = new javax.swing.JLabel();
            jtf_insidenciabusqueda2 = new javax.swing.JTextField();
            jdc_fechainicial3 = new com.toedter.calendar.JDateChooser();
            jLabel25 = new javax.swing.JLabel();
            jScrollPane7 = new javax.swing.JScrollPane();
            jt_catempleados1 = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jLabel11 = new javax.swing.JLabel();
            jtf_insidenciabusqueda = new javax.swing.JTextField();
            jbtn_busqudainsi = new javax.swing.JButton();
            jftf_asist_idemplea2 = new javax.swing.JTextField();
            jPanel24 = new javax.swing.JPanel();
            jScrollPane8 = new javax.swing.JScrollPane();
            jt_catempleados2 = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jPanel2 = new javax.swing.JPanel();
            jdc_fechafinal = new com.toedter.calendar.JDateChooser();
            jLabel2 = new javax.swing.JLabel();
            jdc_fechainicial = new com.toedter.calendar.JDateChooser();
            jLabel1 = new javax.swing.JLabel();
            jLabel3 = new javax.swing.JLabel();
            jrbtn_hoy = new javax.swing.JRadioButton();
            jrbtn_estasemana = new javax.swing.JRadioButton();
            jrbtn_semanapasada = new javax.swing.JRadioButton();
            jbtn_generareporte = new javax.swing.JButton();
            jRadioButton1 = new javax.swing.JRadioButton();
            jcmbx_departamento = new javax.swing.JComboBox();
            jLabel14 = new javax.swing.JLabel();
            jckb_noeliminar = new javax.swing.JCheckBox();
            jrbtn_semanaproxima = new javax.swing.JRadioButton();
            jLabel4 = new javax.swing.JLabel();
            jcmbx_interlineado = new javax.swing.JComboBox();
            jLabel7 = new javax.swing.JLabel();
            jtf_margen1 = new javax.swing.JTextField();
            jckb_verhrstrab = new javax.swing.JCheckBox();
            jckb_verhrstrab1 = new javax.swing.JCheckBox();
            jLabel10 = new javax.swing.JLabel();
            jtf_asilinxhoja = new javax.swing.JTextField();
            jPanel7 = new javax.swing.JPanel();
            jPanel8 = new javax.swing.JPanel();
            jScrollPane2 = new javax.swing.JScrollPane();
            jt_catprenominas = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jScrollPane3 = new javax.swing.JScrollPane();
            jt_detalleprenomina = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {

                    return false;
                }
            }
            ;
            jPanel9 = new javax.swing.JPanel();
            jScrollPane4 = new javax.swing.JScrollPane();
            jt_periodos = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jbtn_agregarprenomina = new javax.swing.JButton();
            jtf_periododescribe = new javax.swing.JTextField();
            jtf_idperactua = new javax.swing.JTextField();
            jtf_idpat = new javax.swing.JTextField();
            jtf_idpat1 = new javax.swing.JTextField();
            jButton4 = new javax.swing.JButton();
            jButton3 = new javax.swing.JButton();
            jPanel11 = new javax.swing.JPanel();
            jPanel12 = new javax.swing.JPanel();
            jScrollPane15 = new javax.swing.JScrollPane();
            jt_detalleprenomina1 = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {

                    return false;
                }
            }
            ;
            jlbl_patron = new javax.swing.JLabel();
            jlbl_patrondir = new javax.swing.JLabel();
            jlbl_nrp = new javax.swing.JLabel();
            jlbl_rfc = new javax.swing.JLabel();
            jlbl_periodo = new javax.swing.JLabel();
            jScrollPane16 = new javax.swing.JScrollPane();
            jt_detalleprenomina2 = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {

                    return false;
                }
            }
            ;
            jLabel5 = new javax.swing.JLabel();
            jcmbx_idpatronclasif1 = new javax.swing.JComboBox();
            jLabel6 = new javax.swing.JLabel();
            jtf_margen = new javax.swing.JTextField();
            jtf_prenominaactual = new javax.swing.JTextField();
            jButton5 = new javax.swing.JButton();
            jButton6 = new javax.swing.JButton();
            jScrollPane19 = new javax.swing.JScrollPane();
            jt_hetiposcat = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jPanel20 = new javax.swing.JPanel();
            jPanel21 = new javax.swing.JPanel();
            jScrollPane18 = new javax.swing.JScrollPane();
            jt_historialasistencia_detalle3 = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jScrollPane5 = new javax.swing.JScrollPane();
            jt_catempleados = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jPanel22 = new javax.swing.JPanel();
            jLabel8 = new javax.swing.JLabel();
            jdc_fechainicial1 = new com.toedter.calendar.JDateChooser();
            jLabel9 = new javax.swing.JLabel();
            jdc_fechafinal1 = new com.toedter.calendar.JDateChooser();
            jButton1 = new javax.swing.JButton();
            jbtn_eventosac = new javax.swing.JButton();
            jMenuBar1 = new javax.swing.JMenuBar();
            jMenu1 = new javax.swing.JMenu();
            jmni_salir = new javax.swing.JMenuItem();
            jMenu2 = new javax.swing.JMenu();
            jMenuItem1 = new javax.swing.JMenuItem();
            jmni_generareporte = new javax.swing.JMenuItem();
            jMenuItem2 = new javax.swing.JMenuItem();
            jMenuItem3 = new javax.swing.JMenuItem();
            jMenuItem4 = new javax.swing.JMenuItem();
            jmni_exportarhe = new javax.swing.JMenuItem();
            jmni_eventosa = new javax.swing.JMenuItem();
            jmni_repasishe = new javax.swing.JMenuItem();

            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
            org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(supervision_rh_asistencia_xdia.class);
            setTitle(resourceMap.getString("Form.title")); // NOI18N
            setName("Form"); // NOI18N

            jTabbedPane2.setName("jTabbedPane2"); // NOI18N
            jTabbedPane2.addChangeListener(new javax.swing.event.ChangeListener() {
                public void stateChanged(javax.swing.event.ChangeEvent evt) {
                    jTabbedPane2StateChanged(evt);
                }
            });

            jPanel6.setName("jPanel6"); // NOI18N

            jTabbedPane1.setName("jTabbedPane1"); // NOI18N
            jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() {
                public void stateChanged(javax.swing.event.ChangeEvent evt) {
                    jTabbedPane1StateChanged(evt);
                }
            });

            jPanel1.setName("jPanel1"); // NOI18N

            jPanel10.setName("jPanel10"); // NOI18N

            jScrollPane10.setName("jScrollPane10"); // NOI18N

            jt_historialasistencia.setModel(this.jtable_modelo_asistenciaxdia);
            jt_historialasistencia.setName("jt_historialasistencia"); // NOI18N
            jt_historialasistencia.setRowHeight(100);
            jt_historialasistencia.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_historialasistenciaMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclick(evt);
                        //System.out.println(" double click" );
                    }
                }
            });
            jScrollPane10.setViewportView(jt_historialasistencia);

            javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
            jPanel10.setLayout(jPanel10Layout);
            jPanel10Layout.setHorizontalGroup(
                jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 1013, Short.MAX_VALUE)
            );
            jPanel10Layout.setVerticalGroup(
                jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE)
            );

            jPanel15.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel15.border.title"))); // NOI18N
            jPanel15.setName("jPanel15"); // NOI18N

            jScrollPane11.setName("jScrollPane11"); // NOI18N

            jt_historialasistencia_detalle.setModel(this.jtable_modelo_asistenciaxdia_detalle);
            jt_historialasistencia_detalle.setName("jt_historialasistencia_detalle"); // NOI18N
            jt_historialasistencia_detalle.setRowHeight(28);
            jScrollPane11.setViewportView(jt_historialasistencia_detalle);

            jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
            jLabel35.setName("jLabel35"); // NOI18N

            jtf_asis_fechaasis.setEditable(false);
            jtf_asis_fechaasis.setFont(resourceMap.getFont("jtf_asis_fechaasis.font")); // NOI18N
            jtf_asis_fechaasis.setName("jtf_asis_fechaasis"); // NOI18N

            jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
            jLabel36.setName("jLabel36"); // NOI18N

            jcmbx_asist_status.setName("jcmbx_asist_status"); // NOI18N
            jcmbx_asist_status.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcmbx_asist_statusActionPerformed(evt);
                }
            });

            jftf_asist_horaentrada.setText(resourceMap.getString("jftf_asist_horaentrada.text")); // NOI18N
            jftf_asist_horaentrada.setToolTipText(resourceMap.getString("jftf_asist_horaentrada.toolTipText")); // NOI18N
            jftf_asist_horaentrada.setFont(resourceMap.getFont("jftf_asist_horaentrada.font")); // NOI18N
            jftf_asist_horaentrada.setName("jftf_asist_horaentrada"); // NOI18N
            jftf_asist_horaentrada.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_asist_horaentradaActionPerformed(evt);
                }
            });

            jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
            jLabel37.setName("jLabel37"); // NOI18N

            jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
            jLabel38.setName("jLabel38"); // NOI18N

            jftf_asist_horasalida.setText(resourceMap.getString("jftf_asist_horasalida.text")); // NOI18N
            jftf_asist_horasalida.setToolTipText(resourceMap.getString("jftf_asist_horasalida.toolTipText")); // NOI18N
            jftf_asist_horasalida.setFont(resourceMap.getFont("jftf_asist_horasalida.font")); // NOI18N
            jftf_asist_horasalida.setName("jftf_asist_horasalida"); // NOI18N
            jftf_asist_horasalida.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_asist_horasalidaActionPerformed(evt);
                }
            });

            jLabel39.setText(resourceMap.getString("jLabel39.text")); // NOI18N
            jLabel39.setName("jLabel39"); // NOI18N

            jbtn_asistenciarev.setIcon(resourceMap.getIcon("jbtn_asistenciarev.icon")); // NOI18N
            jbtn_asistenciarev.setText(resourceMap.getString("jbtn_asistenciarev.text")); // NOI18N
            jbtn_asistenciarev.setName("jbtn_asistenciarev"); // NOI18N
            jbtn_asistenciarev.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_asistenciarevActionPerformed(evt);
                }
            });

            jftf_asist_id.setEditable(false);
            jftf_asist_id.setName("jftf_asist_id"); // NOI18N

            jbtn_asist_guardarcambios.setIcon(resourceMap.getIcon("jbtn_asist_guardarcambios.icon")); // NOI18N
            jbtn_asist_guardarcambios.setText(resourceMap.getString("jbtn_asist_guardarcambios.text")); // NOI18N
            jbtn_asist_guardarcambios.setName("jbtn_asist_guardarcambios"); // NOI18N
            jbtn_asist_guardarcambios.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_asist_guardarcambiosActionPerformed(evt);
                }
            });

            jftf_asist_idemplea.setEditable(false);
            jftf_asist_idemplea.setName("jftf_asist_idemplea"); // NOI18N

            jftf_asist_iddepa.setEditable(false);
            jftf_asist_iddepa.setName("jftf_asist_iddepa"); // NOI18N

            jbtn_detalleempleado.setIcon(resourceMap.getIcon("jbtn_detalleempleado.icon")); // NOI18N
            jbtn_detalleempleado.setText(resourceMap.getString("jbtn_detalleempleado.text")); // NOI18N
            jbtn_detalleempleado.setName("jbtn_detalleempleado"); // NOI18N
            jbtn_detalleempleado.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_detalleempleadoActionPerformed(evt);
                }
            });

            jLabel40.setText(resourceMap.getString("jLabel40.text")); // NOI18N
            jLabel40.setName("jLabel40"); // NOI18N

            jtf_asist_horaent_pro.setText(resourceMap.getString("jtf_asist_horaent_pro.text")); // NOI18N
            jtf_asist_horaent_pro.setToolTipText(resourceMap.getString("jtf_asist_horaent_pro.toolTipText")); // NOI18N
            jtf_asist_horaent_pro.setFont(resourceMap.getFont("jtf_asist_horaent_pro.font")); // NOI18N
            jtf_asist_horaent_pro.setName("jtf_asist_horaent_pro"); // NOI18N
            jtf_asist_horaent_pro.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_asist_horaent_proActionPerformed(evt);
                }
            });

            jLabel41.setText(resourceMap.getString("jLabel41.text")); // NOI18N
            jLabel41.setName("jLabel41"); // NOI18N

            jftf_asist_salidaprog.setText(resourceMap.getString("jftf_asist_salidaprog.text")); // NOI18N
            jftf_asist_salidaprog.setToolTipText(resourceMap.getString("jftf_asist_salidaprog.toolTipText")); // NOI18N
            jftf_asist_salidaprog.setFont(resourceMap.getFont("jftf_asist_salidaprog.font")); // NOI18N
            jftf_asist_salidaprog.setName("jftf_asist_salidaprog"); // NOI18N
            jftf_asist_salidaprog.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_asist_salidaprogActionPerformed(evt);
                }
            });

            jLabel42.setText(resourceMap.getString("jLabel42.text")); // NOI18N
            jLabel42.setName("jLabel42"); // NOI18N

            jtf_asist_horaen_dcom.setText(resourceMap.getString("jtf_asist_horaen_dcom.text")); // NOI18N
            jtf_asist_horaen_dcom.setToolTipText(resourceMap.getString("jtf_asist_horaen_dcom.toolTipText")); // NOI18N
            jtf_asist_horaen_dcom.setFont(resourceMap.getFont("jtf_asist_horaen_dcom.font")); // NOI18N
            jtf_asist_horaen_dcom.setName("jtf_asist_horaen_dcom"); // NOI18N
            jtf_asist_horaen_dcom.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_asist_horaen_dcomActionPerformed(evt);
                }
            });

            jLabel43.setText(resourceMap.getString("jLabel43.text")); // NOI18N
            jLabel43.setName("jLabel43"); // NOI18N

            jtf_asist_horasa_dcom.setText(resourceMap.getString("jtf_asist_horasa_dcom.text")); // NOI18N
            jtf_asist_horasa_dcom.setToolTipText(resourceMap.getString("jtf_asist_horasa_dcom.toolTipText")); // NOI18N
            jtf_asist_horasa_dcom.setFont(resourceMap.getFont("jtf_asist_horasa_dcom.font")); // NOI18N
            jtf_asist_horasa_dcom.setName("jtf_asist_horasa_dcom"); // NOI18N
            jtf_asist_horasa_dcom.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_asist_horasa_dcomActionPerformed(evt);
                }
            });

            jLabel44.setText(resourceMap.getString("jLabel44.text")); // NOI18N
            jLabel44.setName("jLabel44"); // NOI18N

            jtf_minutoscomida.setFont(resourceMap.getFont("jtf_minutoscomida.font")); // NOI18N
            jtf_minutoscomida.setText(resourceMap.getString("jtf_minutoscomida.text")); // NOI18N
            jtf_minutoscomida.setName("jtf_minutoscomida"); // NOI18N
            jtf_minutoscomida.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_minutoscomidaActionPerformed(evt);
                }
            });

            jLabel45.setText(resourceMap.getString("jLabel45.text")); // NOI18N
            jLabel45.setName("jLabel45"); // NOI18N

            jtf_asis_fechasalida.setEditable(false);
            jtf_asis_fechasalida.setName("jtf_asis_fechasalida"); // NOI18N

            jtf_horastrabajadas.setEditable(false);
            jtf_horastrabajadas.setFont(resourceMap.getFont("jtf_horastrabajadas.font")); // NOI18N
            jtf_horastrabajadas.setText(resourceMap.getString("jtf_horastrabajadas.text")); // NOI18N
            jtf_horastrabajadas.setName("jtf_horastrabajadas"); // NOI18N

            jLabel47.setText(resourceMap.getString("jLabel47.text")); // NOI18N
            jLabel47.setName("jLabel47"); // NOI18N

            jtf_asist_boservaciones.setText(resourceMap.getString("jtf_asist_boservaciones.text")); // NOI18N
            jtf_asist_boservaciones.setName("jtf_asist_boservaciones"); // NOI18N
            jtf_asist_boservaciones.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_asist_boservacionesActionPerformed(evt);
                }
            });
            jtf_asist_boservaciones.addFocusListener(new java.awt.event.FocusAdapter() {
                public void focusLost(java.awt.event.FocusEvent evt) {
                    jtf_asist_boservacionesFocusLost(evt);
                }
            });

            jlbl_describepuntualidad.setFont(resourceMap.getFont("jlbl_describepuntualidad.font")); // NOI18N
            jlbl_describepuntualidad.setText(resourceMap.getString("jlbl_describepuntualidad.text")); // NOI18N
            jlbl_describepuntualidad.setName("jlbl_describepuntualidad"); // NOI18N

            jLabel49.setText(resourceMap.getString("jLabel49.text")); // NOI18N
            jLabel49.setName("jLabel49"); // NOI18N

            jftf_asist_horaentrada1.setText(resourceMap.getString("jftf_asist_horaentrada1.text")); // NOI18N
            jftf_asist_horaentrada1.setToolTipText(resourceMap.getString("jftf_asist_horaentrada1.toolTipText")); // NOI18N
            jftf_asist_horaentrada1.setFont(resourceMap.getFont("jftf_asist_horaentrada1.font")); // NOI18N
            jftf_asist_horaentrada1.setName("jftf_asist_horaentrada1"); // NOI18N
            jftf_asist_horaentrada1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_asist_horaentrada1ActionPerformed(evt);
                }
            });

            jLabel50.setText(resourceMap.getString("jLabel50.text")); // NOI18N
            jLabel50.setName("jLabel50"); // NOI18N

            jftf_asist_horaentrada2.setEditable(false);
            jftf_asist_horaentrada2.setText(resourceMap.getString("jftf_asist_horaentrada2.text")); // NOI18N
            jftf_asist_horaentrada2.setToolTipText(resourceMap.getString("jftf_asist_horaentrada2.toolTipText")); // NOI18N
            jftf_asist_horaentrada2.setFont(resourceMap.getFont("jftf_asist_horaentrada2.font")); // NOI18N
            jftf_asist_horaentrada2.setName("jftf_asist_horaentrada2"); // NOI18N
            jftf_asist_horaentrada2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_asist_horaentrada2ActionPerformed(evt);
                }
            });

            jLabel51.setText(resourceMap.getString("jLabel51.text")); // NOI18N
            jLabel51.setName("jLabel51"); // NOI18N

            jtf_minutoscomida1.setEditable(false);
            jtf_minutoscomida1.setFont(resourceMap.getFont("jtf_minutoscomida1.font")); // NOI18N
            jtf_minutoscomida1.setText(resourceMap.getString("jtf_minutoscomida1.text")); // NOI18N
            jtf_minutoscomida1.setName("jtf_minutoscomida1"); // NOI18N
            jtf_minutoscomida1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_minutoscomida1ActionPerformed(evt);
                }
            });

            jdc_fechanomina.setToolTipText(resourceMap.getString("jdc_fechanomina.toolTipText")); // NOI18N
            jdc_fechanomina.setDateFormatString(resourceMap.getString("jdc_fechanomina.dateFormatString")); // NOI18N
            jdc_fechanomina.setName("jdc_fechanomina"); // NOI18N
            jdc_fechanomina.addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyPressed(java.awt.event.KeyEvent evt) {
                    jdc_fechanominaKeyPressed(evt);
                }
            });

            jbtn_asist_guardarcambios1.setIcon(resourceMap.getIcon("jbtn_asist_guardarcambios1.icon")); // NOI18N
            jbtn_asist_guardarcambios1.setText(resourceMap.getString("jbtn_asist_guardarcambios1.text")); // NOI18N
            jbtn_asist_guardarcambios1.setToolTipText(resourceMap.getString("jbtn_asist_guardarcambios1.toolTipText")); // NOI18N
            jbtn_asist_guardarcambios1.setName("jbtn_asist_guardarcambios1"); // NOI18N
            jbtn_asist_guardarcambios1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_asist_guardarcambios1ActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
            jPanel15.setLayout(jPanel15Layout);
            jPanel15Layout.setHorizontalGroup(
                jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel15Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createSequentialGroup()
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel42)
                                .addComponent(jLabel50))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jftf_asist_horaentrada2, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jtf_asist_horaen_dcom, javax.swing.GroupLayout.Alignment.LEADING))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(jPanel15Layout.createSequentialGroup()
                                    .addComponent(jLabel43)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_asist_horasa_dcom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(jdc_fechanomina, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createSequentialGroup()
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel35)
                                .addComponent(jLabel36))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jcmbx_asist_status, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jtf_asis_fechaasis, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createSequentialGroup()
                                .addComponent(jLabel44)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_minutoscomida, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel49)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jftf_asist_horaentrada1))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createSequentialGroup()
                                .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_asist_horaent_pro, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel41)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jftf_asist_salidaprog, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 541, Short.MAX_VALUE)
                        .addGroup(jPanel15Layout.createSequentialGroup()
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createSequentialGroup()
                                    .addComponent(jLabel37)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jftf_asist_horaentrada, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel38)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jftf_asist_horasalida, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jlbl_describepuntualidad, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel45)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_asis_fechasalida))
                                .addGroup(jPanel15Layout.createSequentialGroup()
                                    .addGap(1, 1, 1)
                                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addGroup(jPanel15Layout.createSequentialGroup()
                                            .addComponent(jLabel39)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jtf_asist_boservaciones, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel15Layout.createSequentialGroup()
                                            .addComponent(jLabel47, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_horastrabajadas, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel51)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_minutoscomida1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jftf_asist_idemplea)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jbtn_asist_guardarcambios, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jbtn_asist_guardarcambios1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jbtn_detalleempleado, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jbtn_asistenciarev, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addGap(6, 6, 6)))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jftf_asist_iddepa)
                                .addComponent(jftf_asist_id, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE))))
                    .addContainerGap())
            );
            jPanel15Layout.setVerticalGroup(
                jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel15Layout.createSequentialGroup()
                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel15Layout.createSequentialGroup()
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jtf_asis_fechaasis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel35))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jcmbx_asist_status, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel36))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jtf_asist_horaent_pro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel40)
                                .addComponent(jftf_asist_salidaprog, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel41))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel44)
                                .addComponent(jtf_minutoscomida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel49)
                                .addComponent(jftf_asist_horaentrada1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel15Layout.createSequentialGroup()
                            .addGap(116, 116, 116)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jtf_asist_horaen_dcom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel42)
                                .addComponent(jLabel43)
                                .addComponent(jtf_asist_horasa_dcom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel15Layout.createSequentialGroup()
                                    .addGap(8, 8, 8)
                                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel50)
                                        .addComponent(jftf_asist_horaentrada2)))
                                .addGroup(jPanel15Layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jdc_fechanomina, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGroup(jPanel15Layout.createSequentialGroup()
                            .addGap(2, 2, 2)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel37)
                                .addComponent(jftf_asist_horasalida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jlbl_describepuntualidad)
                                .addComponent(jftf_asist_horaentrada, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel38)
                                .addComponent(jLabel45)
                                .addComponent(jtf_asis_fechasalida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(4, 4, 4)
                            .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel47)
                                .addComponent(jtf_horastrabajadas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel51)
                                .addComponent(jtf_minutoscomida1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jbtn_asistenciarev)
                                .addComponent(jftf_asist_idemplea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jftf_asist_iddepa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jbtn_asist_guardarcambios1))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jtf_asist_boservaciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel39)
                                .addComponent(jbtn_asist_guardarcambios)
                                .addComponent(jbtn_detalleempleado, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE)
                                .addComponent(jftf_asist_id, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap())
            );

            jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel5.border.title"))); // NOI18N
            jPanel5.setName("jPanel5"); // NOI18N

            jScrollPane6.setName("jScrollPane6"); // NOI18N

            jlst_clientesdistribucion.setModel(this.modelo);
            jlst_clientesdistribucion.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
            jlst_clientesdistribucion.setName("jlst_clientesdistribucion"); // NOI18N
            jlst_clientesdistribucion.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jlst_clientesdistribucionMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclicktar(evt);
                    }
                }
            });
            jScrollPane6.setViewportView(jlst_clientesdistribucion);

            jbtn_asistenciarev1.setIcon(resourceMap.getIcon("jbtn_asistenciarev1.icon")); // NOI18N
            jbtn_asistenciarev1.setText(resourceMap.getString("jbtn_asistenciarev1.text")); // NOI18N
            jbtn_asistenciarev1.setToolTipText(resourceMap.getString("jbtn_asistenciarev1.toolTipText")); // NOI18N
            jbtn_asistenciarev1.setName("jbtn_asistenciarev1"); // NOI18N
            jbtn_asistenciarev1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_asistenciarev1ActionPerformed(evt);
                }
            });

            jtf_tiendaactual.setEditable(false);
            jtf_tiendaactual.setName("jtf_tiendaactual"); // NOI18N

            jtf_idtar.setEditable(false);
            jtf_idtar.setText(resourceMap.getString("jtf_idtar.text")); // NOI18N
            jtf_idtar.setName("jtf_idtar"); // NOI18N

            jckb_noeliminar1.setText(resourceMap.getString("jckb_noeliminar1.text")); // NOI18N
            jckb_noeliminar1.setToolTipText(resourceMap.getString("jckb_noeliminar1.toolTipText")); // NOI18N
            jckb_noeliminar1.setName("jckb_noeliminar1"); // NOI18N
            jckb_noeliminar1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jckb_noeliminar1ActionPerformed(evt);
                }
            });

            jtf_empleadoactualnombre.setEditable(false);
            jtf_empleadoactualnombre.setName("jtf_empleadoactualnombre"); // NOI18N

            jtf_tareaobs.setText(resourceMap.getString("jtf_tareaobs.text")); // NOI18N
            jtf_tareaobs.setName("jtf_tareaobs"); // NOI18N

            jLabel48.setText(resourceMap.getString("jLabel48.text")); // NOI18N
            jLabel48.setName("jLabel48"); // NOI18N

            javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
            jPanel5.setLayout(jPanel5Layout);
            jPanel5Layout.setHorizontalGroup(
                jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel5Layout.createSequentialGroup()
                            .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)
                                .addComponent(jbtn_asistenciarev1))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jtf_tiendaactual, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jckb_noeliminar1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel48, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addComponent(jtf_empleadoactualnombre, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
                        .addComponent(jtf_tareaobs, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(78, 78, 78)
                    .addComponent(jtf_idtar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap())
            );
            jPanel5Layout.setVerticalGroup(
                jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel5Layout.createSequentialGroup()
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_empleadoactualnombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_idtar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(7, 7, 7)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel5Layout.createSequentialGroup()
                            .addComponent(jtf_tiendaactual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)
                            .addComponent(jLabel48))
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_tareaobs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jbtn_asistenciarev1)
                        .addComponent(jckb_noeliminar1)))
            );

            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, 767, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel5, 0, 240, Short.MAX_VALUE))
                        .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(2, 2, 2))
            );
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

            jPanel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
            jPanel3.setName("jPanel3"); // NOI18N

            jScrollPane1.setName("jScrollPane1"); // NOI18N

            jtb_asitencia.setModel(this.jtable_modelo);
            jtb_asitencia.setName("jtb_asitencia"); // NOI18N
            jtb_asitencia.setRowHeight(40);
            jScrollPane1.setViewportView(jtb_asitencia);

            jLabel12.setFont(resourceMap.getFont("jLabel12.font")); // NOI18N
            jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
            jLabel12.setName("jLabel12"); // NOI18N

            buttonGroup2.add(jrbtn_columnadepartamento);
            jrbtn_columnadepartamento.setText(resourceMap.getString("jrbtn_columnadepartamento.text")); // NOI18N
            jrbtn_columnadepartamento.setActionCommand(resourceMap.getString("jrbtn_columnadepartamento.actionCommand")); // NOI18N
            jrbtn_columnadepartamento.setName("jrbtn_columnadepartamento"); // NOI18N
            jrbtn_columnadepartamento.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_columnadepartamentoActionPerformed(evt);
                }
            });

            buttonGroup2.add(jrbtn_empleado);
            jrbtn_empleado.setText(resourceMap.getString("jrbtn_empleado.text")); // NOI18N
            jrbtn_empleado.setActionCommand(resourceMap.getString("jrbtn_empleado.actionCommand")); // NOI18N
            jrbtn_empleado.setName("jrbtn_empleado"); // NOI18N
            jrbtn_empleado.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_empleadoActionPerformed(evt);
                }
            });

            jLabel13.setFont(resourceMap.getFont("jLabel13.font")); // NOI18N
            jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
            jLabel13.setName("jLabel13"); // NOI18N

            jtf_buscarenjtable.setName("jtf_buscarenjtable"); // NOI18N
            jtf_buscarenjtable.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_buscarenjtableActionPerformed(evt);
                }
            });

            jlb_resultado.setFont(resourceMap.getFont("jlb_resultado.font")); // NOI18N
            jlb_resultado.setText(resourceMap.getString("jlb_resultado.text")); // NOI18N
            jlb_resultado.setName("jlb_resultado"); // NOI18N

            jtf_buscarenjtable1.setName("jtf_buscarenjtable1"); // NOI18N
            jtf_buscarenjtable1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_buscarenjtable1ActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
            jPanel3.setLayout(jPanel3Layout);
            jPanel3Layout.setHorizontalGroup(
                jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addComponent(jLabel12)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jrbtn_columnadepartamento, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jrbtn_empleado)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jLabel13)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_buscarenjtable, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jlb_resultado, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 125, Short.MAX_VALUE)
                            .addComponent(jtf_buscarenjtable1, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1003, Short.MAX_VALUE))
                    .addContainerGap())
            );
            jPanel3Layout.setVerticalGroup(
                jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel13)
                        .addComponent(jtf_buscarenjtable, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jrbtn_empleado)
                        .addComponent(jLabel12)
                        .addComponent(jrbtn_columnadepartamento)
                        .addComponent(jlb_resultado)
                        .addComponent(jtf_buscarenjtable1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 420, Short.MAX_VALUE))
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

            jPanel4.setName("jPanel4"); // NOI18N

            jScrollPane13.setName("jScrollPane13"); // NOI18N

            jt_resumenxstatus.setModel(this.jtable_modelo_asistenciaxdia_resxsta);
            jt_resumenxstatus.setName("jt_resumenxstatus"); // NOI18N
            jt_resumenxstatus.setRowHeight(26);
            jt_historialasistencia.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_historialasistenciaMouseClicked(evt);
                    if(evt.getClickCount() >= 2)
                    {
                        dioclick(evt);
                        //System.out.println(" double click" );
                    }
                }
            });
            jScrollPane13.setViewportView(jt_resumenxstatus);

            javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
            jPanel4.setLayout(jPanel4Layout);
            jPanel4Layout.setHorizontalGroup(
                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 1015, Short.MAX_VALUE)
            );
            jPanel4Layout.setVerticalGroup(
                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane13, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE)
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel4.TabConstraints.tabTitle"), jPanel4); // NOI18N

            jPanel13.setName("jPanel13"); // NOI18N

            jPanel14.setName("jPanel14"); // NOI18N

            jScrollPane14.setName("jScrollPane14"); // NOI18N

            jt_resumenxstatus1.setModel(this.jtable_modelo_empleado);
            jt_resumenxstatus1.setName("jt_resumenxstatus1"); // NOI18N
            jt_resumenxstatus1.setRowHeight(26);
            jt_resumenxstatus1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_resumenxstatus1MouseClicked(evt);
                    if(evt.getClickCount() >= 2)
                    {
                        diodblclickp(evt);
                        //System.out.println(" double click" );
                    }
                }
            });
            jScrollPane14.setViewportView(jt_resumenxstatus1);

            jtf_fechaini.setEditable(false);
            jtf_fechaini.setName("jtf_fechaini"); // NOI18N
            jtf_fechaini.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_fechainiActionPerformed(evt);
                }
            });

            jLabel15.setFont(resourceMap.getFont("jLabel15.font")); // NOI18N
            jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
            jLabel15.setName("jLabel15"); // NOI18N

            jLabel16.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
            jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
            jLabel16.setName("jLabel16"); // NOI18N

            jtf_fechafin.setEditable(false);
            jtf_fechafin.setName("jtf_fechafin"); // NOI18N
            jtf_fechafin.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_fechafinActionPerformed(evt);
                }
            });

            jbtn_imprimirpuntuali.setIcon(resourceMap.getIcon("jbtn_imprimirpuntuali.icon")); // NOI18N
            jbtn_imprimirpuntuali.setText(resourceMap.getString("jbtn_imprimirpuntuali.text")); // NOI18N
            jbtn_imprimirpuntuali.setName("jbtn_imprimirpuntuali"); // NOI18N
            jbtn_imprimirpuntuali.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_imprimirpuntualiActionPerformed(evt);
                }
            });

            buttonGroup3.add(jrbtn_ordenmrm);
            jrbtn_ordenmrm.setText(resourceMap.getString("jrbtn_ordenmrm.text")); // NOI18N
            jrbtn_ordenmrm.setToolTipText(resourceMap.getString("jrbtn_ordenmrm.toolTipText")); // NOI18N
            jrbtn_ordenmrm.setActionCommand(resourceMap.getString("jrbtn_ordenmrm.actionCommand")); // NOI18N
            jrbtn_ordenmrm.setName("jrbtn_ordenmrm"); // NOI18N
            jrbtn_ordenmrm.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_ordenmrmActionPerformed(evt);
                }
            });

            buttonGroup3.add(jrbtn_ordendepa);
            jrbtn_ordendepa.setText(resourceMap.getString("jrbtn_ordendepa.text")); // NOI18N
            jrbtn_ordendepa.setToolTipText(resourceMap.getString("jrbtn_ordendepa.toolTipText")); // NOI18N
            jrbtn_ordendepa.setActionCommand(resourceMap.getString("jrbtn_ordendepa.actionCommand")); // NOI18N
            jrbtn_ordendepa.setName("jrbtn_ordendepa"); // NOI18N
            jrbtn_ordendepa.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_ordendepaActionPerformed(evt);
                }
            });

            jLabel17.setFont(resourceMap.getFont("jLabel17.font")); // NOI18N
            jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
            jLabel17.setName("jLabel17"); // NOI18N

            javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
            jPanel14.setLayout(jPanel14Layout);
            jPanel14Layout.setHorizontalGroup(
                jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel14Layout.createSequentialGroup()
                    .addComponent(jLabel15)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_fechaini, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(83, 83, 83)
                    .addComponent(jLabel16)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_fechafin, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(54, 54, 54)
                    .addComponent(jbtn_imprimirpuntuali, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(42, 42, 42)
                    .addComponent(jLabel17)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jrbtn_ordenmrm)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jrbtn_ordendepa)
                    .addContainerGap(93, Short.MAX_VALUE))
                .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 1015, Short.MAX_VALUE)
            );
            jPanel14Layout.setVerticalGroup(
                jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel14Layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel15)
                        .addComponent(jtf_fechaini, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel16)
                        .addComponent(jtf_fechafin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_imprimirpuntuali)
                        .addComponent(jLabel17)
                        .addComponent(jrbtn_ordenmrm, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jrbtn_ordendepa, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 390, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(24, 24, 24))
            );

            javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
            jPanel13.setLayout(jPanel13Layout);
            jPanel13Layout.setHorizontalGroup(
                jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            );
            jPanel13Layout.setVerticalGroup(
                jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel13Layout.createSequentialGroup()
                    .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, 432, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(22, Short.MAX_VALUE))
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel13.TabConstraints.tabTitle"), jPanel13); // NOI18N

            jPanel16.setName("jPanel16"); // NOI18N

            jPanel17.setName("jPanel17"); // NOI18N

            jScrollPane12.setName("jScrollPane12"); // NOI18N

            jt_historialasistencia1.setModel(this.jtable_modelo_asistenciaxdiahe);
            jt_historialasistencia1.setName("jt_historialasistencia1"); // NOI18N
            jt_historialasistencia1.setRowHeight(30);
            jt_historialasistencia1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_historialasistencia1MouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickhe(evt);
                        //System.out.println(" double click" );
                    }
                }
            });
            jScrollPane12.setViewportView(jt_historialasistencia1);

            javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
            jPanel17.setLayout(jPanel17Layout);
            jPanel17Layout.setHorizontalGroup(
                jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 1023, Short.MAX_VALUE)
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel17Layout.createSequentialGroup()
                        .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 1013, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            );
            jPanel17Layout.setVerticalGroup(
                jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 248, Short.MAX_VALUE)
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel17Layout.createSequentialGroup()
                        .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 246, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            );

            jPanel18.setName("jPanel18"); // NOI18N

            jScrollPane17.setName("jScrollPane17"); // NOI18N

            jt_historialasistencia_detalle1.setModel(this.jtable_modelo_he_detalle);
            jt_historialasistencia_detalle1.setName("jt_historialasistencia_detalle1"); // NOI18N
            jt_historialasistencia_detalle1.setRowHeight(28);
            jt_historialasistencia_detalle1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_historialasistencia_detalle1MouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickhedet(evt);
                        //System.out.println(" double click" );
                    }
                }
            });
            jScrollPane17.setViewportView(jt_historialasistencia_detalle1);

            jLabel52.setText(resourceMap.getString("jLabel52.text")); // NOI18N
            jLabel52.setName("jLabel52"); // NOI18N

            jftf_he_autorizada.setText(resourceMap.getString("jftf_he_autorizada.text")); // NOI18N
            jftf_he_autorizada.setToolTipText(resourceMap.getString("jftf_he_autorizada.toolTipText")); // NOI18N
            jftf_he_autorizada.setFont(resourceMap.getFont("jftf_he_autorizada.font")); // NOI18N
            jftf_he_autorizada.setName("jftf_he_autorizada"); // NOI18N
            jftf_he_autorizada.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_he_autorizadaActionPerformed(evt);
                }
            });

            jLabel53.setText(resourceMap.getString("jLabel53.text")); // NOI18N
            jLabel53.setName("jLabel53"); // NOI18N

            jtf_asist_boservaciones1.setToolTipText(resourceMap.getString("jtf_asist_boservaciones1.toolTipText")); // NOI18N
            jtf_asist_boservaciones1.setName("jtf_asist_boservaciones1"); // NOI18N
            jtf_asist_boservaciones1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_asist_boservaciones1ActionPerformed(evt);
                }
            });
            jtf_asist_boservaciones1.addFocusListener(new java.awt.event.FocusAdapter() {
                public void focusLost(java.awt.event.FocusEvent evt) {
                    jtf_asist_boservaciones1FocusLost(evt);
                }
            });

            jbtn_guardarhe.setIcon(resourceMap.getIcon("jbtn_guardarhe.icon")); // NOI18N
            jbtn_guardarhe.setText(resourceMap.getString("jbtn_guardarhe.text")); // NOI18N
            jbtn_guardarhe.setName("jbtn_guardarhe"); // NOI18N
            jbtn_guardarhe.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_guardarheActionPerformed(evt);
                }
            });

            jLabel46.setText(resourceMap.getString("jLabel46.text")); // NOI18N
            jLabel46.setName("jLabel46"); // NOI18N

            jftf_asist_horaentrada3.setEditable(false);
            jftf_asist_horaentrada3.setText(resourceMap.getString("jftf_asist_horaentrada3.text")); // NOI18N
            jftf_asist_horaentrada3.setToolTipText(resourceMap.getString("jftf_asist_horaentrada3.toolTipText")); // NOI18N
            jftf_asist_horaentrada3.setFont(resourceMap.getFont("jftf_asist_horaentrada3.font")); // NOI18N
            jftf_asist_horaentrada3.setName("jftf_asist_horaentrada3"); // NOI18N
            jftf_asist_horaentrada3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_asist_horaentrada3ActionPerformed(evt);
                }
            });

            jLabel54.setText(resourceMap.getString("jLabel54.text")); // NOI18N
            jLabel54.setName("jLabel54"); // NOI18N

            jftf_asist_horasalida1.setEditable(false);
            jftf_asist_horasalida1.setText(resourceMap.getString("jftf_asist_horasalida1.text")); // NOI18N
            jftf_asist_horasalida1.setToolTipText(resourceMap.getString("jftf_asist_horasalida1.toolTipText")); // NOI18N
            jftf_asist_horasalida1.setFont(resourceMap.getFont("jftf_asist_horasalida1.font")); // NOI18N
            jftf_asist_horasalida1.setName("jftf_asist_horasalida1"); // NOI18N
            jftf_asist_horasalida1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_asist_horasalida1ActionPerformed(evt);
                }
            });

            jlbl_describepuntualidad1.setFont(resourceMap.getFont("jlbl_describepuntualidad1.font")); // NOI18N
            jlbl_describepuntualidad1.setText(resourceMap.getString("jlbl_describepuntualidad1.text")); // NOI18N
            jlbl_describepuntualidad1.setName("jlbl_describepuntualidad1"); // NOI18N

            jLabel55.setText(resourceMap.getString("jLabel55.text")); // NOI18N
            jLabel55.setName("jLabel55"); // NOI18N

            jtf_horastrabajadas1.setEditable(false);
            jtf_horastrabajadas1.setFont(resourceMap.getFont("jtf_horastrabajadas1.font")); // NOI18N
            jtf_horastrabajadas1.setText(resourceMap.getString("jtf_horastrabajadas1.text")); // NOI18N
            jtf_horastrabajadas1.setName("jtf_horastrabajadas1"); // NOI18N

            jLabel56.setText(resourceMap.getString("jLabel56.text")); // NOI18N
            jLabel56.setName("jLabel56"); // NOI18N

            jtf_minutoscomida2.setEditable(false);
            jtf_minutoscomida2.setFont(resourceMap.getFont("jtf_minutoscomida2.font")); // NOI18N
            jtf_minutoscomida2.setText(resourceMap.getString("jtf_minutoscomida2.text")); // NOI18N
            jtf_minutoscomida2.setName("jtf_minutoscomida2"); // NOI18N
            jtf_minutoscomida2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_minutoscomida2ActionPerformed(evt);
                }
            });

            jckb_noeliminar2.setText(resourceMap.getString("jckb_noeliminar2.text")); // NOI18N
            jckb_noeliminar2.setToolTipText(resourceMap.getString("jckb_noeliminar2.toolTipText")); // NOI18N
            jckb_noeliminar2.setName("jckb_noeliminar2"); // NOI18N
            jckb_noeliminar2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jckb_noeliminar2ActionPerformed(evt);
                }
            });

            jftf_heempleado.setEditable(false);
            jftf_heempleado.setText(resourceMap.getString("jftf_heempleado.text")); // NOI18N
            jftf_heempleado.setToolTipText(resourceMap.getString("jftf_heempleado.toolTipText")); // NOI18N
            jftf_heempleado.setFont(resourceMap.getFont("jftf_heempleado.font")); // NOI18N
            jftf_heempleado.setName("jftf_heempleado"); // NOI18N
            jftf_heempleado.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_heempleadoActionPerformed(evt);
                }
            });

            jftf_he_tipohe.setEditable(false);
            jftf_he_tipohe.setText(resourceMap.getString("jftf_he_tipohe.text")); // NOI18N
            jftf_he_tipohe.setToolTipText(resourceMap.getString("jftf_he_tipohe.toolTipText")); // NOI18N
            jftf_he_tipohe.setFont(resourceMap.getFont("jftf_he_tipohe.font")); // NOI18N
            jftf_he_tipohe.setName("jftf_he_tipohe"); // NOI18N
            jftf_he_tipohe.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_he_tipoheActionPerformed(evt);
                }
            });

            jftf_he_fila.setEditable(false);
            jftf_he_fila.setText(resourceMap.getString("jftf_he_fila.text")); // NOI18N
            jftf_he_fila.setToolTipText(resourceMap.getString("jftf_he_fila.toolTipText")); // NOI18N
            jftf_he_fila.setFont(resourceMap.getFont("jftf_he_fila.font")); // NOI18N
            jftf_he_fila.setName("jftf_he_fila"); // NOI18N
            jftf_he_fila.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_he_filaActionPerformed(evt);
                }
            });

            jftf_he_totcolu.setEditable(false);
            jftf_he_totcolu.setText(resourceMap.getString("jftf_he_totcolu.text")); // NOI18N
            jftf_he_totcolu.setToolTipText(resourceMap.getString("jftf_he_totcolu.toolTipText")); // NOI18N
            jftf_he_totcolu.setFont(resourceMap.getFont("jftf_he_totcolu.font")); // NOI18N
            jftf_he_totcolu.setName("jftf_he_totcolu"); // NOI18N
            jftf_he_totcolu.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_he_totcoluActionPerformed(evt);
                }
            });

            jftf_he_totfila.setEditable(false);
            jftf_he_totfila.setText(resourceMap.getString("jftf_he_totfila.text")); // NOI18N
            jftf_he_totfila.setToolTipText(resourceMap.getString("jftf_he_totfila.toolTipText")); // NOI18N
            jftf_he_totfila.setFont(resourceMap.getFont("jftf_he_totfila.font")); // NOI18N
            jftf_he_totfila.setName("jftf_he_totfila"); // NOI18N
            jftf_he_totfila.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jftf_he_totfilaActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
            jPanel18.setLayout(jPanel18Layout);
            jPanel18Layout.setHorizontalGroup(
                jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel18Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel18Layout.createSequentialGroup()
                            .addComponent(jftf_heempleado, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jftf_he_tipohe, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jftf_he_fila, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(1, 1, 1)
                            .addComponent(jftf_he_totcolu, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(1, 1, 1)
                            .addComponent(jftf_he_totfila, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(84, 84, 84)
                            .addComponent(jLabel52)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jftf_he_autorizada, javax.swing.GroupLayout.DEFAULT_SIZE, 68, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel53)
                            .addGap(10, 10, 10)
                            .addComponent(jtf_asist_boservaciones1, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel18Layout.createSequentialGroup()
                            .addComponent(jLabel46)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jftf_asist_horaentrada3, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel54)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jftf_asist_horasalida1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jlbl_describepuntualidad1, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel55, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_horastrabajadas1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel56)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel18Layout.createSequentialGroup()
                            .addComponent(jtf_minutoscomida2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jckb_noeliminar2))
                        .addComponent(jbtn_guardarhe))
                    .addGap(22, 22, 22))
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 697, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(24, Short.MAX_VALUE)))
            );
            jPanel18Layout.setVerticalGroup(
                jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel18Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel46)
                            .addComponent(jftf_asist_horasalida1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jlbl_describepuntualidad1)
                            .addComponent(jftf_asist_horaentrada3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel54)
                            .addComponent(jLabel55)
                            .addComponent(jtf_horastrabajadas1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel56)
                            .addComponent(jtf_minutoscomida2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jckb_noeliminar2))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 130, Short.MAX_VALUE)
                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel52)
                        .addComponent(jftf_he_autorizada, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel53)
                        .addComponent(jtf_asist_boservaciones1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_guardarhe)
                        .addComponent(jftf_he_tipohe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jftf_heempleado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jftf_he_fila, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jftf_he_totcolu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jftf_he_totfila, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap())
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addGap(39, 39, 39)
                        .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(55, Short.MAX_VALUE)))
            );

            jPanel19.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel19.border.title"))); // NOI18N
            jPanel19.setName("jPanel19"); // NOI18N

            jtf_empleadoactualnombre1.setEditable(false);
            jtf_empleadoactualnombre1.setName("jtf_empleadoactualnombre1"); // NOI18N

            jtf_asis_fechaasis1.setEditable(false);
            jtf_asis_fechaasis1.setFont(resourceMap.getFont("jtf_asis_fechaasis1.font")); // NOI18N
            jtf_asis_fechaasis1.setName("jtf_asis_fechaasis1"); // NOI18N

            jtf_hestatus.setEditable(false);
            jtf_hestatus.setFont(resourceMap.getFont("jtf_hestatus.font")); // NOI18N
            jtf_hestatus.setName("jtf_hestatus"); // NOI18N

            javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
            jPanel19.setLayout(jPanel19Layout);
            jPanel19Layout.setHorizontalGroup(
                jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jtf_empleadoactualnombre1, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jtf_hestatus, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jtf_asis_fechaasis1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE))
            );
            jPanel19Layout.setVerticalGroup(
                jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel19Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jtf_empleadoactualnombre1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_asis_fechaasis1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_hestatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(83, Short.MAX_VALUE))
            );

            javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
            jPanel16.setLayout(jPanel16Layout);
            jPanel16Layout.setHorizontalGroup(
                jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel16Layout.createSequentialGroup()
                    .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(11, Short.MAX_VALUE))
            );
            jPanel16Layout.setVerticalGroup(
                jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel16Layout.createSequentialGroup()
                    .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel16.TabConstraints.tabTitle"), jPanel16); // NOI18N

            jPanel23.setName("jPanel23"); // NOI18N

            jPanel25.setName("jPanel25"); // NOI18N

            jdc_fechainicial2.setToolTipText(resourceMap.getString("jdc_fechainicial2.toolTipText")); // NOI18N
            jdc_fechainicial2.setDateFormatString(resourceMap.getString("jdc_fechainicial2.dateFormatString")); // NOI18N
            jdc_fechainicial2.setName("jdc_fechainicial2"); // NOI18N

            jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
            jLabel18.setName("jLabel18"); // NOI18N

            jdc_fechafinal2.setToolTipText(resourceMap.getString("jdc_fechafinal2.toolTipText")); // NOI18N
            jdc_fechafinal2.setDateFormatString(resourceMap.getString("jdc_fechafinal2.dateFormatString")); // NOI18N
            jdc_fechafinal2.setMaxSelectableDate(new java.util.Date(253370790102000L));
            jdc_fechafinal2.setName("jdc_fechafinal2"); // NOI18N

            jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
            jLabel19.setName("jLabel19"); // NOI18N

            jcmbx_asist_status1.setName("jcmbx_asist_status1"); // NOI18N
            jcmbx_asist_status1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcmbx_asist_status1ActionPerformed(evt);
                }
            });

            jLabel57.setText(resourceMap.getString("jLabel57.text")); // NOI18N
            jLabel57.setName("jLabel57"); // NOI18N

            jtf_empleadoactualnombre2.setEditable(false);
            jtf_empleadoactualnombre2.setFont(resourceMap.getFont("jtf_empleadoactualnombre2.font")); // NOI18N
            jtf_empleadoactualnombre2.setName("jtf_empleadoactualnombre2"); // NOI18N

            jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
            jLabel20.setName("jLabel20"); // NOI18N

            jftf_asist_idemplea1.setEditable(false);
            jftf_asist_idemplea1.setFont(resourceMap.getFont("jftf_asist_idemplea1.font")); // NOI18N
            jftf_asist_idemplea1.setName("jftf_asist_idemplea1"); // NOI18N

            jtf_empleadoactualnombre3.setEditable(false);
            jtf_empleadoactualnombre3.setFont(resourceMap.getFont("jtf_empleadoactualnombre3.font")); // NOI18N
            jtf_empleadoactualnombre3.setName("jtf_empleadoactualnombre3"); // NOI18N

            jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
            jLabel21.setName("jLabel21"); // NOI18N

            jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
            jLabel22.setName("jLabel22"); // NOI18N

            jtf_empleadoactualnombre4.setEditable(false);
            jtf_empleadoactualnombre4.setFont(resourceMap.getFont("jtf_empleadoactualnombre4.font")); // NOI18N
            jtf_empleadoactualnombre4.setName("jtf_empleadoactualnombre4"); // NOI18N

            jbtn_busqudainsi1.setIcon(resourceMap.getIcon("jbtn_busqudainsi1.icon")); // NOI18N
            jbtn_busqudainsi1.setText(resourceMap.getString("jbtn_busqudainsi1.text")); // NOI18N
            jbtn_busqudainsi1.setName("jbtn_busqudainsi1"); // NOI18N
            jbtn_busqudainsi1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_busqudainsi1ActionPerformed(evt);
                }
            });

            jtf_insidenciabusqueda1.setName("jtf_insidenciabusqueda1"); // NOI18N
            jtf_insidenciabusqueda1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_insidenciabusqueda1ActionPerformed(evt);
                }
            });

            jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
            jLabel23.setName("jLabel23"); // NOI18N

            jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
            jLabel24.setName("jLabel24"); // NOI18N

            jtf_insidenciabusqueda2.setName("jtf_insidenciabusqueda2"); // NOI18N
            jtf_insidenciabusqueda2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_insidenciabusqueda2ActionPerformed(evt);
                }
            });

            jdc_fechainicial3.setToolTipText(resourceMap.getString("jdc_fechainicial3.toolTipText")); // NOI18N
            jdc_fechainicial3.setDateFormatString(resourceMap.getString("jdc_fechainicial3.dateFormatString")); // NOI18N
            jdc_fechainicial3.setEnabled(false);
            jdc_fechainicial3.setName("jdc_fechainicial3"); // NOI18N

            jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
            jLabel25.setName("jLabel25"); // NOI18N

            jScrollPane7.setName("jScrollPane7"); // NOI18N

            jt_catempleados1.setModel(this.jtable_modelo_empleadoe);
            jt_catempleados1.setName("jt_catempleados1"); // NOI18N
            jt_catempleados1.setRowHeight(26);
            jt_catempleados1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_catempleados1MouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickevein(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane7.setViewportView(jt_catempleados1);

            jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
            jLabel11.setName("jLabel11"); // NOI18N

            jtf_insidenciabusqueda.setText(resourceMap.getString("jtf_insidenciabusqueda.text")); // NOI18N
            jtf_insidenciabusqueda.setName("jtf_insidenciabusqueda"); // NOI18N
            jtf_insidenciabusqueda.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_insidenciabusquedaActionPerformed(evt);
                }
            });

            jbtn_busqudainsi.setIcon(resourceMap.getIcon("jbtn_busqudainsi.icon")); // NOI18N
            jbtn_busqudainsi.setText(resourceMap.getString("jbtn_busqudainsi.text")); // NOI18N
            jbtn_busqudainsi.setName("jbtn_busqudainsi"); // NOI18N
            jbtn_busqudainsi.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_busqudainsiActionPerformed(evt);
                }
            });

            jftf_asist_idemplea2.setEditable(false);
            jftf_asist_idemplea2.setFont(resourceMap.getFont("jftf_asist_idemplea2.font")); // NOI18N
            jftf_asist_idemplea2.setName("jftf_asist_idemplea2"); // NOI18N

            javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
            jPanel25.setLayout(jPanel25Layout);
            jPanel25Layout.setHorizontalGroup(
                jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel25Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel25Layout.createSequentialGroup()
                            .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jtf_insidenciabusqueda, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jbtn_busqudainsi)
                            .addGap(271, 271, 271))
                        .addGroup(jPanel25Layout.createSequentialGroup()
                            .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_insidenciabusqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jbtn_busqudainsi1)
                            .addContainerGap())
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel25Layout.createSequentialGroup()
                            .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                                    .addComponent(jLabel18)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jdc_fechainicial2, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE)
                                    .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jdc_fechafinal2, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                                    .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_insidenciabusqueda1, javax.swing.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE))
                                .addComponent(jScrollPane7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 390, Short.MAX_VALUE)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel25Layout.createSequentialGroup()
                                            .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jftf_asist_idemplea1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel25Layout.createSequentialGroup()
                                            .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jftf_asist_idemplea2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jtf_empleadoactualnombre3, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
                                        .addComponent(jtf_empleadoactualnombre2, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                                    .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_empleadoactualnombre4, javax.swing.GroupLayout.DEFAULT_SIZE, 336, Short.MAX_VALUE))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                                    .addComponent(jLabel25)
                                    .addGap(18, 18, 18)
                                    .addComponent(jdc_fechainicial3, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel57)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jcmbx_asist_status1, 0, 173, Short.MAX_VALUE)))
                            .addGap(238, 238, 238))))
            );
            jPanel25Layout.setVerticalGroup(
                jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel25Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jbtn_busqudainsi)
                        .addComponent(jLabel11)
                        .addComponent(jtf_insidenciabusqueda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE)
                    .addGap(18, 18, 18)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_empleadoactualnombre2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel20)
                        .addComponent(jftf_asist_idemplea1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel21)
                        .addComponent(jtf_empleadoactualnombre3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jftf_asist_idemplea2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_empleadoactualnombre4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel22))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel25)
                        .addComponent(jdc_fechainicial3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jcmbx_asist_status1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel57)))
                    .addGap(13, 13, 13)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel18)
                        .addComponent(jdc_fechainicial2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanel25Layout.createSequentialGroup()
                            .addGap(1, 1, 1)
                            .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jdc_fechafinal2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel23)
                        .addComponent(jtf_insidenciabusqueda1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(32, 32, 32)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel24)
                        .addComponent(jtf_insidenciabusqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_busqudainsi1))
                    .addContainerGap())
            );

            jPanel24.setName("jPanel24"); // NOI18N

            jScrollPane8.setName("jScrollPane8"); // NOI18N

            jt_catempleados2.setModel(this.jtable_modelo_insidencias);
            jt_catempleados2.setName("jt_catempleados2"); // NOI18N
            jt_catempleados2.setRowHeight(26);
            jScrollPane8.setViewportView(jt_catempleados2);

            javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
            jPanel24.setLayout(jPanel24Layout);
            jPanel24Layout.setHorizontalGroup(
                jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 602, Short.MAX_VALUE)
            );
            jPanel24Layout.setVerticalGroup(
                jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel24Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE))
            );

            javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
            jPanel23.setLayout(jPanel23Layout);
            jPanel23Layout.setHorizontalGroup(
                jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel23Layout.createSequentialGroup()
                    .addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, 407, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            );
            jPanel23Layout.setVerticalGroup(
                jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel23Layout.createSequentialGroup()
                    .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jPanel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap())
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel23.TabConstraints.tabTitle"), jPanel23); // NOI18N

            jPanel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
            jPanel2.setName("jPanel2"); // NOI18N

            jdc_fechafinal.setToolTipText(resourceMap.getString("jdc_fechafinal.toolTipText")); // NOI18N
            jdc_fechafinal.setDateFormatString(resourceMap.getString("jdc_fechafinal.dateFormatString")); // NOI18N
            jdc_fechafinal.setMaxSelectableDate(new java.util.Date(253370790102000L));
            jdc_fechafinal.setName("jdc_fechafinal"); // NOI18N

            jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
            jLabel2.setName("jLabel2"); // NOI18N

            jdc_fechainicial.setToolTipText(resourceMap.getString("jdc_fechainicial.toolTipText")); // NOI18N
            jdc_fechainicial.setDateFormatString(resourceMap.getString("jdc_fechainicial.dateFormatString")); // NOI18N
            jdc_fechainicial.setName("jdc_fechainicial"); // NOI18N

            jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
            jLabel1.setName("jLabel1"); // NOI18N

            jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
            jLabel3.setName("jLabel3"); // NOI18N

            buttonGroup1.add(jrbtn_hoy);
            jrbtn_hoy.setText(resourceMap.getString("jrbtn_hoy.text")); // NOI18N
            jrbtn_hoy.setToolTipText(resourceMap.getString("jrbtn_hoy.toolTipText")); // NOI18N
            jrbtn_hoy.setName("jrbtn_hoy"); // NOI18N
            jrbtn_hoy.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_hoyActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrbtn_estasemana);
            jrbtn_estasemana.setText(resourceMap.getString("jrbtn_estasemana.text")); // NOI18N
            jrbtn_estasemana.setToolTipText(resourceMap.getString("jrbtn_estasemana.toolTipText")); // NOI18N
            jrbtn_estasemana.setName("jrbtn_estasemana"); // NOI18N
            jrbtn_estasemana.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_estasemanaActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrbtn_semanapasada);
            jrbtn_semanapasada.setText(resourceMap.getString("jrbtn_semanapasada.text")); // NOI18N
            jrbtn_semanapasada.setToolTipText(resourceMap.getString("jrbtn_semanapasada.toolTipText")); // NOI18N
            jrbtn_semanapasada.setName("jrbtn_semanapasada"); // NOI18N
            jrbtn_semanapasada.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_semanapasadaActionPerformed(evt);
                }
            });

            jbtn_generareporte.setIcon(resourceMap.getIcon("jbtn_generareporte.icon")); // NOI18N
            jbtn_generareporte.setText(resourceMap.getString("jbtn_generareporte.text")); // NOI18N
            jbtn_generareporte.setToolTipText(resourceMap.getString("jbtn_generareporte.toolTipText")); // NOI18N
            jbtn_generareporte.setName("jbtn_generareporte"); // NOI18N
            jbtn_generareporte.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_generareporteActionPerformed(evt);
                }
            });

            buttonGroup1.add(jRadioButton1);
            jRadioButton1.setText(resourceMap.getString("jRadioButton1.text")); // NOI18N
            jRadioButton1.setToolTipText(resourceMap.getString("jRadioButton1.toolTipText")); // NOI18N
            jRadioButton1.setName("jRadioButton1"); // NOI18N
            jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton1ActionPerformed(evt);
                }
            });

            jcmbx_departamento.setName("jcmbx_departamento"); // NOI18N
            jcmbx_departamento.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcmbx_departamentoActionPerformed(evt);
                }
            });

            jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
            jLabel14.setName("jLabel14"); // NOI18N

            jckb_noeliminar.setText(resourceMap.getString("jckb_noeliminar.text")); // NOI18N
            jckb_noeliminar.setName("jckb_noeliminar"); // NOI18N
            jckb_noeliminar.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jckb_noeliminarActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrbtn_semanaproxima);
            jrbtn_semanaproxima.setText(resourceMap.getString("jrbtn_semanaproxima.text")); // NOI18N
            jrbtn_semanaproxima.setToolTipText(resourceMap.getString("jrbtn_semanaproxima.toolTipText")); // NOI18N
            jrbtn_semanaproxima.setName("jrbtn_semanaproxima"); // NOI18N
            jrbtn_semanaproxima.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_semanaproximaActionPerformed(evt);
                }
            });

            jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
            jLabel4.setName("jLabel4"); // NOI18N

            jcmbx_interlineado.setName("jcmbx_interlineado"); // NOI18N
            jcmbx_interlineado.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcmbx_interlineadoActionPerformed(evt);
                }
            });

            jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
            jLabel7.setName("jLabel7"); // NOI18N

            jtf_margen1.setText(resourceMap.getString("jtf_margen1.text")); // NOI18N
            jtf_margen1.setName("jtf_margen1"); // NOI18N

            jckb_verhrstrab.setText(resourceMap.getString("jckb_verhrstrab.text")); // NOI18N
            jckb_verhrstrab.setName("jckb_verhrstrab"); // NOI18N
            jckb_verhrstrab.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jckb_verhrstrabActionPerformed(evt);
                }
            });

            jckb_verhrstrab1.setText(resourceMap.getString("jckb_verhrstrab1.text")); // NOI18N
            jckb_verhrstrab1.setName("jckb_verhrstrab1"); // NOI18N
            jckb_verhrstrab1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jckb_verhrstrab1ActionPerformed(evt);
                }
            });

            jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
            jLabel10.setName("jLabel10"); // NOI18N

            jtf_asilinxhoja.setText(resourceMap.getString("jtf_asilinxhoja.text")); // NOI18N
            jtf_asilinxhoja.setName("jtf_asilinxhoja"); // NOI18N

            javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
            jPanel2.setLayout(jPanel2Layout);
            jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(jLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jdc_fechainicial, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jrbtn_hoy)
                            .addGap(6, 6, 6)
                            .addComponent(jRadioButton1)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jdc_fechafinal, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jLabel14)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jcmbx_departamento, 0, 263, Short.MAX_VALUE))
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(jrbtn_estasemana)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jrbtn_semanapasada)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jrbtn_semanaproxima)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jckb_verhrstrab)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jckb_verhrstrab1)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(jbtn_generareporte)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_margen1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_asilinxhoja, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(jckb_noeliminar)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jcmbx_interlineado, 0, 139, Short.MAX_VALUE)))
                    .addContainerGap())
            );
            jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel1)
                        .addComponent(jdc_fechainicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jdc_fechafinal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jcmbx_departamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel14)
                                .addComponent(jbtn_generareporte)
                                .addComponent(jLabel7)
                                .addComponent(jLabel10)
                                .addComponent(jtf_asilinxhoja, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jtf_margen1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jckb_noeliminar)
                                .addComponent(jcmbx_interlineado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel4)))
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addGap(27, 27, 27)
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel3)
                                .addComponent(jrbtn_hoy, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jRadioButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jrbtn_estasemana, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jrbtn_semanapasada, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jrbtn_semanaproxima, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jckb_verhrstrab)
                                .addComponent(jckb_verhrstrab1))))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            );

            javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
            jPanel6.setLayout(jPanel6Layout);
            jPanel6Layout.setHorizontalGroup(
                jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1020, Short.MAX_VALUE)
                        .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap())
            );
            jPanel6Layout.setVerticalGroup(
                jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel6Layout.createSequentialGroup()
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE))
            );

            jTabbedPane2.addTab(resourceMap.getString("jPanel6.TabConstraints.tabTitle"), jPanel6); // NOI18N

            jPanel7.setName("jPanel7"); // NOI18N

            jPanel8.setName("jPanel8"); // NOI18N

            jScrollPane2.setName("jScrollPane2"); // NOI18N

            jt_catprenominas.setModel(this.jtable_modelo_prenomina);
            jt_catprenominas.setName("jt_catprenominas"); // NOI18N
            jt_catprenominas.setRowHeight(22);
            jt_catprenominas.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_catprenominasMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickpre(evt);
                    }
                    if(evt.getClickCount() >= 2)
                    {
                        //dioclickpreprin(evt);
                    }
                }
            });
            jScrollPane2.setViewportView(jt_catprenominas);

            jScrollPane3.setName("jScrollPane3"); // NOI18N

            jt_detalleprenomina.setModel(this.jtable_modelo_detalleprenomina);
            jt_detalleprenomina.setName("jt_detalleprenomina"); // NOI18N
            jt_detalleprenomina.setRowHeight(22);
            jt_detalleprenomina.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_detalleprenominaMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        //dioclickpret(evt);
                    }
                }
            });
            jt_detalleprenomina.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
                public void propertyChange(java.beans.PropertyChangeEvent evt) {
                    jt_detalleprenominaPropertyChange(evt);
                }
            });
            jScrollPane3.setViewportView(jt_detalleprenomina);

            jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel9.border.title"))); // NOI18N
            jPanel9.setName("jPanel9"); // NOI18N

            jScrollPane4.setName("jScrollPane4"); // NOI18N

            jt_periodos.setModel(this.jtable_modelo_periodo);
            jt_periodos.setName("jt_periodos"); // NOI18N
            jt_periodos.setRowHeight(22);
            jt_periodos.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_periodosMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickper(evt);
                    }
                }
            });
            jScrollPane4.setViewportView(jt_periodos);

            jbtn_agregarprenomina.setIcon(resourceMap.getIcon("jbtn_agregarprenomina.icon")); // NOI18N
            jbtn_agregarprenomina.setText(resourceMap.getString("jbtn_agregarprenomina.text")); // NOI18N
            jbtn_agregarprenomina.setName("jbtn_agregarprenomina"); // NOI18N
            jbtn_agregarprenomina.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_agregarprenominaActionPerformed(evt);
                }
            });

            jtf_periododescribe.setEditable(false);
            jtf_periododescribe.setFont(resourceMap.getFont("jtf_periododescribe.font")); // NOI18N
            jtf_periododescribe.setText(resourceMap.getString("jtf_periododescribe.text")); // NOI18N
            jtf_periododescribe.setName("jtf_periododescribe"); // NOI18N

            jtf_idperactua.setEditable(false);
            jtf_idperactua.setFont(resourceMap.getFont("jtf_idperactua.font")); // NOI18N
            jtf_idperactua.setText(resourceMap.getString("jtf_idperactua.text")); // NOI18N
            jtf_idperactua.setName("jtf_idperactua"); // NOI18N

            jtf_idpat.setEditable(false);
            jtf_idpat.setFont(resourceMap.getFont("jtf_idpat.font")); // NOI18N
            jtf_idpat.setText(resourceMap.getString("jtf_idpat.text")); // NOI18N
            jtf_idpat.setName("jtf_idpat"); // NOI18N

            jtf_idpat1.setEditable(false);
            jtf_idpat1.setFont(resourceMap.getFont("jtf_idpat1.font")); // NOI18N
            jtf_idpat1.setText(resourceMap.getString("jtf_idpat1.text")); // NOI18N
            jtf_idpat1.setName("jtf_idpat1"); // NOI18N

            javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
            jPanel9.setLayout(jPanel9Layout);
            jPanel9Layout.setHorizontalGroup(
                jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel9Layout.createSequentialGroup()
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 694, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jtf_idperactua, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_agregarprenomina)
                        .addComponent(jtf_periododescribe, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanel9Layout.createSequentialGroup()
                            .addComponent(jtf_idpat, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jtf_idpat1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(58, Short.MAX_VALUE))
            );
            jPanel9Layout.setVerticalGroup(
                jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel9Layout.createSequentialGroup()
                    .addComponent(jbtn_agregarprenomina)
                    .addGap(3, 3, 3)
                    .addComponent(jtf_idperactua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_periododescribe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_idpat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_idpat1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
            );

            jButton4.setIcon(resourceMap.getIcon("jButton4.icon")); // NOI18N
            jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
            jButton4.setToolTipText(resourceMap.getString("jButton4.toolTipText")); // NOI18N
            jButton4.setName("jButton4"); // NOI18N
            jButton4.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton4ActionPerformed(evt);
                }
            });

            jButton3.setIcon(resourceMap.getIcon("jButton3.icon")); // NOI18N
            jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
            jButton3.setToolTipText(resourceMap.getString("jButton3.toolTipText")); // NOI18N
            jButton3.setName("jButton3"); // NOI18N
            jButton3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton3ActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
            jPanel8.setLayout(jPanel8Layout);
            jPanel8Layout.setHorizontalGroup(
                jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                    .addGap(158, 158, 158)
                    .addComponent(jButton3)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 311, Short.MAX_VALUE)
                    .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(293, 293, 293))
                .addGroup(jPanel8Layout.createSequentialGroup()
                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jPanel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1002, Short.MAX_VALUE)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 1002, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(21, Short.MAX_VALUE))
            );
            jPanel8Layout.setVerticalGroup(
                jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                    .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)
                    .addGap(17, 17, 17)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButton4)
                        .addComponent(jButton3))
                    .addGap(21, 21, 21))
            );

            javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
            jPanel7.setLayout(jPanel7Layout);
            jPanel7Layout.setHorizontalGroup(
                jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            );
            jPanel7Layout.setVerticalGroup(
                jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            );

            jTabbedPane2.addTab(resourceMap.getString("jPanel7.TabConstraints.tabTitle"), jPanel7); // NOI18N

            jPanel11.setName("jPanel11"); // NOI18N

            jPanel12.setName("jPanel12"); // NOI18N

            jScrollPane15.setName("jScrollPane15"); // NOI18N

            jt_detalleprenomina1.setFont(resourceMap.getFont("jt_detalleprenomina1.font")); // NOI18N
            jt_detalleprenomina1.setModel(this.jtable_modelo_reportef);
            jt_detalleprenomina1.setName("jt_detalleprenomina1"); // NOI18N
            jt_detalleprenomina1.setRowHeight(30);
            jt_detalleprenomina1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
                public void propertyChange(java.beans.PropertyChangeEvent evt) {
                    jt_detalleprenomina1PropertyChange(evt);
                }
            });
            jScrollPane15.setViewportView(jt_detalleprenomina1);

            jlbl_patron.setFont(resourceMap.getFont("jlbl_patron.font")); // NOI18N
            jlbl_patron.setText(resourceMap.getString("jlbl_patron.text")); // NOI18N
            jlbl_patron.setName("jlbl_patron"); // NOI18N

            jlbl_patrondir.setFont(resourceMap.getFont("jlbl_patrondir.font")); // NOI18N
            jlbl_patrondir.setText(resourceMap.getString("jlbl_patrondir.text")); // NOI18N
            jlbl_patrondir.setName("jlbl_patrondir"); // NOI18N

            jlbl_nrp.setFont(resourceMap.getFont("jlbl_nrp.font")); // NOI18N
            jlbl_nrp.setText(resourceMap.getString("jlbl_nrp.text")); // NOI18N
            jlbl_nrp.setName("jlbl_nrp"); // NOI18N

            jlbl_rfc.setFont(resourceMap.getFont("jlbl_rfc.font")); // NOI18N
            jlbl_rfc.setText(resourceMap.getString("jlbl_rfc.text")); // NOI18N
            jlbl_rfc.setName("jlbl_rfc"); // NOI18N

            jlbl_periodo.setFont(resourceMap.getFont("jlbl_periodo.font")); // NOI18N
            jlbl_periodo.setText(resourceMap.getString("jlbl_periodo.text")); // NOI18N
            jlbl_periodo.setName("jlbl_periodo"); // NOI18N

            jScrollPane16.setName("jScrollPane16"); // NOI18N

            jt_detalleprenomina2.setFont(resourceMap.getFont("jt_detalleprenomina2.font")); // NOI18N
            jt_detalleprenomina2.setModel(this.jtable_modelo_reportef2);
            jt_detalleprenomina2.setName("jt_detalleprenomina2"); // NOI18N
            jt_detalleprenomina2.setRowHeight(30);
            jt_detalleprenomina2.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
                public void propertyChange(java.beans.PropertyChangeEvent evt) {
                    jt_detalleprenomina2PropertyChange(evt);
                }
            });
            jScrollPane16.setViewportView(jt_detalleprenomina2);

            jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
            jLabel5.setName("jLabel5"); // NOI18N

            jcmbx_idpatronclasif1.setName("jcmbx_idpatronclasif1"); // NOI18N
            jcmbx_idpatronclasif1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcmbx_idpatronclasif1ActionPerformed(evt);
                }
            });

            jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
            jLabel6.setName("jLabel6"); // NOI18N

            jtf_margen.setText(resourceMap.getString("jtf_margen.text")); // NOI18N
            jtf_margen.setName("jtf_margen"); // NOI18N

            jtf_prenominaactual.setEditable(false);
            jtf_prenominaactual.setFont(resourceMap.getFont("jtf_prenominaactual.font")); // NOI18N
            jtf_prenominaactual.setText(resourceMap.getString("jtf_prenominaactual.text")); // NOI18N
            jtf_prenominaactual.setName("jtf_prenominaactual"); // NOI18N

            jButton5.setIcon(resourceMap.getIcon("jButton5.icon")); // NOI18N
            jButton5.setText(resourceMap.getString("jButton5.text")); // NOI18N
            jButton5.setToolTipText(resourceMap.getString("jButton5.toolTipText")); // NOI18N
            jButton5.setName("jButton5"); // NOI18N
            jButton5.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton5ActionPerformed(evt);
                }
            });

            jButton6.setIcon(resourceMap.getIcon("jButton6.icon")); // NOI18N
            jButton6.setText(resourceMap.getString("jButton6.text")); // NOI18N
            jButton6.setToolTipText(resourceMap.getString("jButton6.toolTipText")); // NOI18N
            jButton6.setName("jButton6"); // NOI18N
            jButton6.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton6ActionPerformed(evt);
                }
            });

            jScrollPane19.setName("jScrollPane19"); // NOI18N

            jt_hetiposcat.setModel(this.jtable_modelo_hecattipo);
            jt_hetiposcat.setName("jt_hetiposcat"); // NOI18N
            jt_hetiposcat.setRowHeight(28);
            jScrollPane19.setViewportView(jt_hetiposcat);

            javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
            jPanel12.setLayout(jPanel12Layout);
            jPanel12Layout.setHorizontalGroup(
                jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel12Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane16, javax.swing.GroupLayout.DEFAULT_SIZE, 1013, Short.MAX_VALUE)
                        .addGroup(jPanel12Layout.createSequentialGroup()
                            .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 1003, Short.MAX_VALUE)
                            .addContainerGap())
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jlbl_periodo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 651, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(jPanel12Layout.createSequentialGroup()
                                    .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jlbl_patrondir, javax.swing.GroupLayout.PREFERRED_SIZE, 534, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGroup(jPanel12Layout.createSequentialGroup()
                                            .addComponent(jlbl_nrp, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(74, 74, 74)
                                            .addComponent(jlbl_rfc, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addComponent(jlbl_patron, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 149, Short.MAX_VALUE)
                                    .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel12Layout.createSequentialGroup()
                                            .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(jtf_margen, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel12Layout.createSequentialGroup()
                                            .addComponent(jLabel5)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jcmbx_idpatronclasif1, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                            .addContainerGap())))
                .addGroup(jPanel12Layout.createSequentialGroup()
                    .addGap(55, 55, 55)
                    .addComponent(jtf_prenominaactual, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(422, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                    .addContainerGap(849, Short.MAX_VALUE)
                    .addComponent(jButton5)
                    .addGap(41, 41, 41))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane19, 0, 0, Short.MAX_VALUE)
                    .addGap(718, 718, 718)
                    .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(48, 48, 48))
            );
            jPanel12Layout.setVerticalGroup(
                jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel12Layout.createSequentialGroup()
                    .addGap(11, 11, 11)
                    .addComponent(jtf_prenominaactual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jlbl_patron)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel12Layout.createSequentialGroup()
                            .addComponent(jlbl_patrondir)
                            .addGap(9, 9, 9)
                            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jlbl_nrp)
                                .addComponent(jlbl_rfc))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jlbl_periodo))
                        .addGroup(jPanel12Layout.createSequentialGroup()
                            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jtf_margen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel6))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jcmbx_idpatronclasif1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel5))))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane15, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jButton6)
                        .addComponent(jScrollPane19, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(21, 21, 21)
                    .addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jButton5)
                    .addContainerGap(29, Short.MAX_VALUE))
            );

            javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
            jPanel11.setLayout(jPanel11Layout);
            jPanel11Layout.setHorizontalGroup(
                jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            );
            jPanel11Layout.setVerticalGroup(
                jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel12, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            );

            jTabbedPane2.addTab(resourceMap.getString("jPanel11.TabConstraints.tabTitle"), jPanel11); // NOI18N

            jPanel20.setName("jPanel20"); // NOI18N

            jPanel21.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel21.border.title"))); // NOI18N
            jPanel21.setName("jPanel21"); // NOI18N

            jScrollPane18.setName("jScrollPane18"); // NOI18N

            jt_historialasistencia_detalle3.setModel(jtable_modelo_eventos);
            jt_historialasistencia_detalle3.setName("jt_historialasistencia_detalle3"); // NOI18N
            jt_historialasistencia_detalle3.setRowHeight(22);
            jScrollPane18.setViewportView(jt_historialasistencia_detalle3);

            jScrollPane5.setName("jScrollPane5"); // NOI18N

            jt_catempleados.setModel(this.jtable_modelo_empleadoe);
            jt_catempleados.setName("jt_catempleados"); // NOI18N
            jt_catempleados.setRowHeight(22);
            jt_catempleados.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_catempleadosMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickeve(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane5.setViewportView(jt_catempleados);

            javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
            jPanel21.setLayout(jPanel21Layout);
            jPanel21Layout.setHorizontalGroup(
                jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel21Layout.createSequentialGroup()
                    .addComponent(jScrollPane18, javax.swing.GroupLayout.DEFAULT_SIZE, 627, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 364, javax.swing.GroupLayout.PREFERRED_SIZE))
            );
            jPanel21Layout.setVerticalGroup(
                jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE)
                .addComponent(jScrollPane18, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE)
            );

            jPanel22.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel22.border.title"))); // NOI18N
            jPanel22.setName("jPanel22"); // NOI18N

            jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
            jLabel8.setName("jLabel8"); // NOI18N

            jdc_fechainicial1.setToolTipText(resourceMap.getString("jdc_fechainicial1.toolTipText")); // NOI18N
            jdc_fechainicial1.setDateFormatString(resourceMap.getString("jdc_fechainicial1.dateFormatString")); // NOI18N
            jdc_fechainicial1.setName("jdc_fechainicial1"); // NOI18N

            jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
            jLabel9.setName("jLabel9"); // NOI18N

            jdc_fechafinal1.setToolTipText(resourceMap.getString("jdc_fechafinal1.toolTipText")); // NOI18N
            jdc_fechafinal1.setDateFormatString(resourceMap.getString("jdc_fechafinal1.dateFormatString")); // NOI18N
            jdc_fechafinal1.setMaxSelectableDate(new java.util.Date(253370790102000L));
            jdc_fechafinal1.setName("jdc_fechafinal1"); // NOI18N

            jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
            jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
            jButton1.setName("jButton1"); // NOI18N
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
                }
            });

            jbtn_eventosac.setIcon(resourceMap.getIcon("jbtn_eventosac.icon")); // NOI18N
            jbtn_eventosac.setText(resourceMap.getString("jbtn_eventosac.text")); // NOI18N
            jbtn_eventosac.setName("jbtn_eventosac"); // NOI18N
            jbtn_eventosac.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_eventosacActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
            jPanel22.setLayout(jPanel22Layout);
            jPanel22Layout.setHorizontalGroup(
                jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel22Layout.createSequentialGroup()
                    .addComponent(jLabel8)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jdc_fechainicial1, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jdc_fechafinal1, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jbtn_eventosac, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(362, Short.MAX_VALUE))
            );
            jPanel22Layout.setVerticalGroup(
                jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel22Layout.createSequentialGroup()
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel8)
                        .addComponent(jdc_fechainicial1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jdc_fechafinal1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton1)
                            .addComponent(jbtn_eventosac)))
                    .addContainerGap(19, Short.MAX_VALUE))
            );

            javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
            jPanel20.setLayout(jPanel20Layout);
            jPanel20Layout.setHorizontalGroup(
                jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel20Layout.createSequentialGroup()
                    .addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap())
            );
            jPanel20Layout.setVerticalGroup(
                jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel20Layout.createSequentialGroup()
                    .addComponent(jPanel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            );

            jTabbedPane2.addTab(resourceMap.getString("jPanel20.TabConstraints.tabTitle"), jPanel20); // NOI18N

            jMenuBar1.setName("jMenuBar1"); // NOI18N

            jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
            jMenu1.setName("jMenu1"); // NOI18N

            jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
            jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
            jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
            jmni_salir.setName("jmni_salir"); // NOI18N
            jmni_salir.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_salirActionPerformed(evt);
                }
            });
            jMenu1.add(jmni_salir);

            jMenuBar1.add(jMenu1);

            jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
            jMenu2.setName("jMenu2"); // NOI18N
            jMenu2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenu2ActionPerformed(evt);
                }
            });

            jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
            jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N
            jMenuItem1.setName("jMenuItem1"); // NOI18N
            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem1ActionPerformed(evt);
                }
            });
            jMenu2.add(jMenuItem1);

            jmni_generareporte.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.ALT_MASK));
            jmni_generareporte.setText(resourceMap.getString("jmni_generareporte.text")); // NOI18N
            jmni_generareporte.setName("jmni_generareporte"); // NOI18N
            jmni_generareporte.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_generareporteActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_generareporte);

            jMenuItem2.setText(resourceMap.getString("jMenuItem2.text")); // NOI18N
            jMenuItem2.setName("jMenuItem2"); // NOI18N
            jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem2ActionPerformed(evt);
                }
            });
            jMenu2.add(jMenuItem2);

            jMenuItem3.setText(resourceMap.getString("jMenuItem3.text")); // NOI18N
            jMenuItem3.setName("jMenuItem3"); // NOI18N
            jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem3ActionPerformed(evt);
                }
            });
            jMenu2.add(jMenuItem3);

            jMenuItem4.setText(resourceMap.getString("jMenuItem4.text")); // NOI18N
            jMenuItem4.setName("jMenuItem4"); // NOI18N
            jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem4ActionPerformed(evt);
                }
            });
            jMenu2.add(jMenuItem4);

            jmni_exportarhe.setText(resourceMap.getString("jmni_exportarhe.text")); // NOI18N
            jmni_exportarhe.setName("jmni_exportarhe"); // NOI18N
            jmni_exportarhe.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_exportarheActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_exportarhe);

            jmni_eventosa.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
            jmni_eventosa.setIcon(resourceMap.getIcon("jmni_eventosa.icon")); // NOI18N
            jmni_eventosa.setText(resourceMap.getString("jmni_eventosa.text")); // NOI18N
            jmni_eventosa.setName("jmni_eventosa"); // NOI18N
            jmni_eventosa.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_eventosaActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_eventosa);

            jmni_repasishe.setText(resourceMap.getString("jmni_repasishe.text")); // NOI18N
            jmni_repasishe.setName("jmni_repasishe"); // NOI18N
            jmni_repasishe.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_repasisheActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_repasishe);

            jMenuBar1.add(jMenu2);

            setJMenuBar(jMenuBar1);

            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 1028, javax.swing.GroupLayout.PREFERRED_SIZE)
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 570, Short.MAX_VALUE)
            );

            pack();
        }// </editor-fold>//GEN-END:initComponents

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
         // TODO add your handling code here:
          if(JOptionPane.showConfirmDialog(null, "Desea Salir?")==0)
                {
                    this.dispose();
                }
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jrbtn_hoyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_hoyActionPerformed
        // TODO add your handling code here:
        this.jdc_fechainicial.setDate(fechahoy);
        this.jdc_fechafinal.setDate(fechahoy);
}//GEN-LAST:event_jrbtn_hoyActionPerformed

    private void jrbtn_estasemanaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_estasemanaActionPerformed
        // TODO add your handling code here:
        Calendar fechainisem = Calendar.getInstance(); // obtiene la fecha actual
        Calendar fechafinsem = Calendar.getInstance(); // obtiene la fecha actual
        int diadesemana=fechainisem.get(Calendar.DAY_OF_WEEK)-2;

        System.out.println(diadesemana);
        fechainisem.add(Calendar.DATE, -diadesemana); // incrementa en 30 días la fecha actual.
        this.jdc_fechainicial.setDate(fechainisem.getTime());

        fechafinsem.add(Calendar.DATE, (6-diadesemana)); // incrementa en 30 días la fecha actual.
        this.jdc_fechafinal.setDate(fechafinsem.getTime());
}//GEN-LAST:event_jrbtn_estasemanaActionPerformed

    private void jrbtn_semanapasadaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_semanapasadaActionPerformed
        // TODO add your handling code here:
        Calendar fechainisem = Calendar.getInstance(); // obtiene la fecha actual
        Calendar fechafinsem = Calendar.getInstance(); // obtiene la fecha actual
        int diadesemana=fechainisem.get(Calendar.DAY_OF_WEEK)+5;
        System.out.println(diadesemana);
        fechainisem.add(Calendar.DATE, -diadesemana); // incrementa en 30 días la fecha actual.
        this.jdc_fechainicial.setDate(fechainisem.getTime());

        diadesemana=fechafinsem.get(Calendar.DAY_OF_WEEK)-1;
        System.out.println(diadesemana);
        fechafinsem.add(Calendar.DATE, -diadesemana); // incrementa en 30 días la fecha actual.
        this.jdc_fechafinal.setDate(fechafinsem.getTime());
}//GEN-LAST:event_jrbtn_semanapasadaActionPerformed

    private void jbtn_generareporteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generareporteActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Generar Reporte?")==0)
        {
           // this.LimpiarJTable();
            //this.iniciar_modelo_de_tabla();
            yacargueasixdia=0;
            yacargueasidetaxdia=0;
            yacargueresxstatus=0;
            yacarguepuntual=0;
             switch (indexactual)
                        {
                            case 0:
                                yacargueasixdia=1;
                                this.jtf_buscarenjtable1.setText(this.jcmbx_departamento.getSelectedItem().toString());
                                 this.jtf_fechaini.setText(this.fechaeuropea(this.jdc_fechainicial.getDate()));
                                this.jtf_fechafin.setText(this.fechaeuropea(this.jdc_fechafinal.getDate()));
                                this.iniciar_modelo_columnas(this.jdc_fechainicial.getDate(), this.jdc_fechafinal.getDate());
                                this.carga_datos_asistenciama(28, textobuscadepa,this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                                if((!this.jckb_verhrstrab.isSelected())&&(!this.jckb_verhrstrab1.isSelected()))
                                    {
                                        this.carga_datos_tareaxdia(5, textobuscadepa,this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                                    }
                            break;
                            case 1:
                                yacargueasidetaxdia=1;
                                this.jtf_buscarenjtable1.setText(this.jcmbx_departamento.getSelectedItem().toString());
                                this.iniciar_modelo_columnasasideta(this.jdc_fechainicial.getDate(), this.jdc_fechafinal.getDate());
                                this.carga_datos_asistencia(1,textobuscadepa,this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                            break;
                            case 2:
                                yacargueresxstatus=1;
                                this.jtf_buscarenjtable1.setText(this.jcmbx_departamento.getSelectedItem().toString());
                                this.carga_datos_asistenciama(28, textobuscadepa,this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                            break;
                            case 3:
                                yacarguepuntual=1;
                                this.jtf_buscarenjtable1.setText(this.jcmbx_departamento.getSelectedItem().toString());
                                this.jtf_fechaini.setText(this.fechaeuropea(this.jdc_fechainicial.getDate()));
                                this.jtf_fechafin.setText(this.fechaeuropea(this.jdc_fechafinal.getDate()));
                                this.carga_datos_puntualidad(23, String.valueOf(ordenpun),this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                            break;
                            case 4:
                                yacargueasixdia=1;
                                this.jtf_buscarenjtable1.setText(this.jcmbx_departamento.getSelectedItem().toString());
                                 this.jtf_fechaini.setText(this.fechaeuropea(this.jdc_fechainicial.getDate()));
                                this.jtf_fechafin.setText(this.fechaeuropea(this.jdc_fechafinal.getDate()));
                                this.iniciar_modelo_columnas(this.jdc_fechainicial.getDate(), this.jdc_fechafinal.getDate());
                                this.carga_datos_asistenciama(28, textobuscadepa,this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                                this.carga_datos_tareaxdia(5, textobuscadepa,this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                                yacargue4=1;
                                hedet=0;
                                this.carga_datos_hepordia(25, "0",this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));

                            break;
                        }
        }
}//GEN-LAST:event_jbtn_generareporteActionPerformed

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        // TODO add your handling code here:
        Calendar fechainisem = Calendar.getInstance(); // obtiene la fecha actual
        fechainisem.add(Calendar.DATE, -1); // incrementa en 30 días la fecha actual.
        this.jdc_fechainicial.setDate(fechainisem.getTime());
        this.jdc_fechafinal.setDate(fechainisem.getTime());
}//GEN-LAST:event_jRadioButton1ActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jrbtn_columnadepartamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_columnadepartamentoActionPerformed
        // TODO add your handling code here:
        columnavisualisa=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_columnadepartamentoActionPerformed

    private void jrbtn_empleadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_empleadoActionPerformed
        // TODO add your handling code here:
        columnavisualisa=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_empleadoActionPerformed

    private void jtf_buscarenjtableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_buscarenjtableActionPerformed
        // TODO add your handling code here:
        this.find_textoenjtable(columnavisualisa, 0, this.jtf_buscarenjtable.getText().toUpperCase().trim());
}//GEN-LAST:event_jtf_buscarenjtableActionPerformed

    private void jmni_generareporteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_generareporteActionPerformed
        // TODO add your handling code here:
        this.jbtn_asistenciarevActionPerformed(evt);
    }//GEN-LAST:event_jmni_generareporteActionPerformed

    private void jMenu2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu2ActionPerformed
        // TODO add your handling code here:
        this.jbtn_generareporteActionPerformed(evt);
    }//GEN-LAST:event_jMenu2ActionPerformed

    private void jTabbedPane1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane1StateChanged
        // TODO add your handling code here:
          indexactual=this.jTabbedPane1.getSelectedIndex();
          if(((indexactual==4)||(indexactual==0))&&(yacargueasixdia==0))
                {
                   yacargueasixdia=1;
                   this.iniciar_modelo_columnas(this.jdc_fechainicial.getDate(), this.jdc_fechafinal.getDate());
                   this.carga_datos_asistenciama(28, textobuscadepa,this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                }
          if((indexactual==1)&&(yacargueasidetaxdia==0))
                {
                   yacargueasidetaxdia=1;
                   this.iniciar_modelo_columnasasideta(this.jdc_fechainicial.getDate(), this.jdc_fechafinal.getDate());
                   this.carga_datos_asistencia(1,textobuscadepa,this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                }
           if((indexactual==2)&&(yacargueresxstatus==0))
                {
                   yacargueresxstatus=1;
                   this.carga_datos_asistenciama(28, textobuscadepa,this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                }
              if((indexactual==3)&&(yacarguepuntual==0))
                {
                     yacarguepuntual=1;
                     this.jtf_fechaini.setText(this.fechaeuropea(this.jdc_fechainicial.getDate()));
                     this.jtf_fechafin.setText(this.fechaeuropea(this.jdc_fechafinal.getDate()));
                     this.carga_datos_puntualidad(23,String.valueOf(ordenpun),this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                }
           if((indexactual==4)&&(yacargue4==0))
                {
                hedet=0;
                yacargue4=0;
                this.carga_datos_hepordia(25, "0",this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
                }
           if((indexactual==5)&&(yacargue5==0))
                {
                yacargue5=0;
                this.carga_datos_insidencias(0, "0","","");
                }

    }//GEN-LAST:event_jTabbedPane1StateChanged

    private void jcmbx_departamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_departamentoActionPerformed
        // TODO add your handling code here:
        String deparreglo[]=this.jcmbx_departamento.getSelectedItem().toString().split(":");
        if (controlcombodetpa>0){
            textobuscadepa=deparreglo[0];
        }

    }//GEN-LAST:event_jcmbx_departamentoActionPerformed

    private void jckb_noeliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jckb_noeliminarActionPerformed
        // TODO add your handling code here:

    }//GEN-LAST:event_jckb_noeliminarActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        try {
            // TODO add your handling code here:
            this.jt_historialasistencia.print();
        } catch (PrinterException ex) {
            Logger.getLogger(supervision_rh_asistencia_xdia.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        try {
            // TODO add your handling code here:
            this.jtb_asitencia.print();
        } catch (PrinterException ex) {
            Logger.getLogger(supervision_rh_asistencia_xdia.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jbtn_asistenciarev1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_asistenciarev1ActionPerformed
        // TODO add your handling code here:
              //invoco al metodo que trae el recordset de datos

    String arreglo_idtarea[]=this.jtf_tiendaactual.getText().toString().split(":");
    int encontrado=0,columnatitulo=0;
    String texto="select * from x1_supervision_empleados_tareas_operaciones(1,"+this.jtf_idtar.getText()+",'"+ this.jftf_asist_idemplea.getText()+"','"+arreglo_idtarea[0]+"','"+this.fechaamericana(this.jdc_fechanomina.getDate())+"','"+this.jtf_tareaobs.getText().toUpperCase()+"');";
    System.out.println(texto);
    //if(JOptionPane.showConfirmDialog(null, "<html><b>Desea Crear Asistencia?<br>"+this.jtf_empleadoactualnombre.getText()+"<br>"+this.jtf_asis_fechaasis.getText()+"</b></html>")==0)
    if(this.jtf_tiendaactual.getText().toString().length()>0)
    {
        if(JOptionPane.showConfirmDialog(null, "<html>Estan estan Correcto sus Datos:?<h2><br>Tarea:"+this.jtf_tiendaactual.getText().toString()+"<br>"+this.jtf_empleadoactualnombre.getText()+"<br>"+this.fechaeuropea(this.jdc_fechanomina.getDate())+"</h2></html>")==0)
        {
        try
            {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                while (rs.next())
                    {
                         if (rs.getInt(1) > 0)
                            {
                                JOptionPane.showMessageDialog(null,"Movimiento "+rs.getInt(1)+"Generado Correctamente", "Sistema Integral(Caja) : Confirmacion",1);
                                this.jtf_idtar.setText(rs.getString(1));
                                columnatitulo=this.findcolumna_xma(this.fechaeuropea(this.jdc_fechanomina.getDate()));
                                this.crea_hoja_tareaprog(this.jftf_asist_idemplea.getText(),this.jtf_tareaobs.getText().toUpperCase(),columnatitulo);
                            }
                    }
             }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
        }
      }
    }//GEN-LAST:event_jbtn_asistenciarev1ActionPerformed

    private void jrbtn_semanaproximaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_semanaproximaActionPerformed
        // TODO add your handling code here:
           Calendar fechainisem = Calendar.getInstance(); // obtiene la fecha actual
        int diadesemana=fechainisem.get(Calendar.DAY_OF_WEEK)-2;
        System.out.println(diadesemana);
        fechainisem.add(Calendar.DATE, 7-diadesemana); // incrementa en 30 días la fecha actual.
        this.jdc_fechainicial.setDate(fechainisem.getTime());
        fechainisem.add(Calendar.DATE, 6); // incrementa en 30 días la fecha actual.
        this.jdc_fechafinal.setDate(fechainisem.getTime());
}//GEN-LAST:event_jrbtn_semanaproximaActionPerformed

    private void jckb_noeliminar1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jckb_noeliminar1ActionPerformed
        // TODO add your handling code here:

      String arreglo_idtarea[]=this.jtf_tiendaactual.getText().toString().split(":");
      int encontrado=0,columnatitulo=0;
    String texto="select * from x1_supervision_empleados_tareas_operaciones("+2+","+"0"+",'"+ this.jftf_asist_idemplea.getText()+"','"+""+"','"+this.fechaamericana(this.jdc_fechanomina.getDate())+"','"+""+"');";
    System.out.println(texto);
   
        if(JOptionPane.showConfirmDialog(null, "<html><h2>Desea Eliminar Tarea de Fecha :?<br>"+this.fechaeuropea(this.jdc_fechanomina.getDate())+"</h2></html>")==0)
        {
        try
            {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                while (rs.next())
                    {
                         if (rs.getInt(1) > 0)
                            {
                                JOptionPane.showMessageDialog(null,"Tarea ELIMINADA Correctamente", "Sistema Integral(Asitencia) : Confirmacion",1);
                                this.jtf_idtar.setText("0");
                            }
                    }
             }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
       
      }
}//GEN-LAST:event_jckb_noeliminar1ActionPerformed

    private void jbtn_agregarprenominaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_agregarprenominaActionPerformed
        // TODO add your handling code here:
 if(this.jtf_idperactua.getText().toString().length()> 0)
        {
              if(JOptionPane.showConfirmDialog(null, "<html><h2>Deseas Crear Prenomina Para Periodo:<br>"+this.jtf_periododescribe.getText()+"? ")==0)
                    {
                        supervision_rh_prenomina_agregar fsrhpa=new supervision_rh_prenomina_agregar(this.jtf_idperactua.getText().toString(),variables_global.getdepartamento()+":"+variables_global.getdepartamento_des(),this.jtf_periododescribe.getText());
                        fsrhpa.pack();
                        fsrhpa.setVisible(true);
                    }
        }
 else
       {
                JOptionPane.showMessageDialog(null,"Error Elija su Periodo a Elaborar Prenomina", "Sistema Integral Indicadores",1);
        }


}//GEN-LAST:event_jbtn_agregarprenominaActionPerformed

    private void jt_detalleprenominaPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jt_detalleprenominaPropertyChange
        // TODO add your handling code here:
}//GEN-LAST:event_jt_detalleprenominaPropertyChange

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
                    JPasswordField pwd = new JPasswordField(10);
                    //int action = JOptionPane.showConfirmDialog(null, pwd,"Contraseña:(Use Tab p/moverse o Mause)",JOptionPane.OK_CANCEL_OPTION);
                   // if(action < 0)
                   //     {
                   //         JOptionPane.showMessageDialog(null,"No se realiza Proceso, Gracias");
                   //     }
                   // else
                   //     {
                  //      if(variables_global.getPassword().equals(String.valueOf(pwd.getPassword())))
                  //          {
                           // int fila = jt_catprenominas.getSelectedRow();
                           // String idpe[]=this.jtable_modelo_prenomina.getValueAt(fila, 2).toString().split(":");
                           // String idpeid[]=this.jtable_modelo_prenomina.getValueAt(fila, 0).toString().split(":");
                           // supervision_rh_prenomina_print fsrhp=new supervision_rh_prenomina_print(idpeid[0],idpe[0],4,this.jtable_modelo_prenomina.getValueAt(fila, 4).toString(),"","","","");
                           // fsrhp.pack();
                           // fsrhp.setVisible(true);
                           /*  String pade="",padede="";

                             try
                                {
                                    rs = x.sieuno_executediversosv2("select * from x1_supervision_departamentos_catalogo(2,'"+this.jtf_idpat.getText()+"','','') as (id smallint);",variables_global.getconexiongral());
                                    while (rs.next())
                                        {
                                            pade=rs.getString("id");
                                        }
                                }
                                        catch(Exception e)
                                        {
                                            System.out.println(e.getMessage());
                                        }
                                    try
                                        {
                                            rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_patron(11,'"+pade+"','','','') as (idraz smallint,nombre character varying(60),dir character varying(50),col character varying(50),pob character varying(40),cp character varying(6),rfc character varying(15),regpat text,obs text);",variables_global.getconexiongral());
                                            while (rs.next())
                                                {
                                                    this.jlbl_patron.setText(rs.getString("nombre"));
                                                     this.jlbl_patrondir.setText("DIRECCION:"+rs.getString("dir")+" "+rs.getString("col"));
                                                      this.jlbl_nrp.setText("N.R.P.:"+rs.getString("regpat"));
                                                        this.jlbl_rfc.setText("R.F.C:"+rs.getString("rfc"));
                                                    //jtable_modelo_patrones.addRow(new Object[]{rs.getString("idraz"),rs.getString("nombre"),rs.getString("rfc"),rs.getString("regpat"),rs.getString("obs"),"0","0","0"});
                                                }
                                        }
                                        catch(Exception e)
                                        {
                                            System.out.println(e.getMessage());
                                        }
                                        this.carga_datos_empleado_x_patrondetalle1nof(14, pade, this.jtf_idperactua.getText(),"0");
                                        this.carga_datos_empleado_x_patron_movdetnof1(6, pade, this.jtf_idperactua.getText());
*/
        float filas = this.jtable_modelo_reportef.getRowCount() ;
        float paginas = filas /25;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimir(ni,paginas);
             }

                           // }
                           //}
                        
}//GEN-LAST:event_jButton4ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
          int fila = jt_catprenominas.getSelectedRow();
          String pade="";
          /*
                    JPasswordField pwd = new JPasswordField(10);
                    int action = JOptionPane.showConfirmDialog(null, pwd,"Contraseña:(Use Tab p/moverse o Mause)",JOptionPane.OK_CANCEL_OPTION);
                    if(action < 0)
                        {
                            JOptionPane.showMessageDialog(null,"No se realiza Proceso, Gracias");
                        }
                    else
                        {
                        if(variables_global.getPassword().equals(String.valueOf(pwd.getPassword())))
                            {
                               // String idpe[]=this.jtable_modelo_prenomina.getValueAt(fila, 2).toString().split(":");
                               // String idpeid[]=this.jtable_modelo_prenomina.getValueAt(fila, 0).toString().split(":");
                               // supervision_rh_prenomina_print fsrhp=new supervision_rh_prenomina_print(idpeid[0],idpe[0],5,this.jtable_modelo_prenomina.getValueAt(fila, 4).toString(),"","","","");
                               // fsrhp.pack();
                               // fsrhp.setVisible(true);
                            }
                        }
           */
                                   
//                       this.carga_datos_empleado_x_patrondetalle2(13, pade, this.jtf_idperactua.getText(),"0");
//                        this.carga_datos_empleado_x_patron_movdet2(6, pade, this.jtf_idperactua.getText());

        float filas = this.jtable_modelo_reportef2.getRowCount() ;
        float paginas = filas /25;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimirf(ni,paginas);
             }

}//GEN-LAST:event_jButton3ActionPerformed

    private void jtf_asist_boservacionesFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtf_asist_boservacionesFocusLost
        // TODO add your handling code here:
        this.jbtn_asist_guardarcambios.requestFocus();
}//GEN-LAST:event_jtf_asist_boservacionesFocusLost

    private void jtf_asist_boservacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_asist_boservacionesActionPerformed
        // TODO add your handling code here:
        this.jbtn_asist_guardarcambios.requestFocus();
}//GEN-LAST:event_jtf_asist_boservacionesActionPerformed

    private void jdc_fechanominaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jdc_fechanominaKeyPressed
        // TODO add your handling code here:
}//GEN-LAST:event_jdc_fechanominaKeyPressed

    private void jtf_minutoscomidaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_minutoscomidaActionPerformed
        // TODO add your handling code here:
        this.jtf_asist_horaen_dcom.selectAll();
        this.jtf_asist_horaen_dcom.requestFocus();
}//GEN-LAST:event_jtf_minutoscomidaActionPerformed

    private void jtf_asist_horasa_dcomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_asist_horasa_dcomActionPerformed
        try {
            // TODO add your handling code here:
            this.calcular_horastrab();
        } catch (ParseException ex) {
            Logger.getLogger(supervision_rh_asistencia_xdia.class.getName()).log(Level.SEVERE, null, ex);
        }
        this.jftf_asist_horaentrada1.selectAll();
        this.jftf_asist_horaentrada1.requestFocus();
}//GEN-LAST:event_jtf_asist_horasa_dcomActionPerformed

    private void jtf_asist_horaen_dcomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_asist_horaen_dcomActionPerformed
        // TODO add your handling code here:
        this.jtf_asist_horasa_dcom.selectAll();
        this.jtf_asist_horasa_dcom.requestFocus();
}//GEN-LAST:event_jtf_asist_horaen_dcomActionPerformed

    private void jftf_asist_salidaprogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_asist_salidaprogActionPerformed
        // TODO add your handling code here:
        this.jtf_minutoscomida.selectAll();
        this.jtf_minutoscomida.requestFocus();
}//GEN-LAST:event_jftf_asist_salidaprogActionPerformed

    private void jtf_asist_horaent_proActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_asist_horaent_proActionPerformed
        // TODO add your handling code here:
        this.jftf_asist_salidaprog.selectAll();
        this.jftf_asist_salidaprog.requestFocus();
}//GEN-LAST:event_jtf_asist_horaent_proActionPerformed

    private void jbtn_detalleempleadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_detalleempleadoActionPerformed
        // TODO add your handling code here:
        if (variables_global.getnivelusu() == 3) {
            JPasswordField pwd = new JPasswordField(10);
            int action = JOptionPane.showConfirmDialog(null, pwd,"Contraseña:(Use Tab p/moverse o Mause)",JOptionPane.OK_CANCEL_OPTION);
            if(action < 0) {
                JOptionPane.showMessageDialog(null,"No se realiza Proceso, Gracias");
            } else {
                if(variables_global.getPassword().equals(String.valueOf(pwd.getPassword()))) {
                    supervision_rh_edita fsrhe=new supervision_rh_edita(Integer.valueOf(this.jftf_asist_idemplea.getText()),1);
                    fsrhe.pack();
                    fsrhe.setVisible(true);
                }
            }
        }
        if ((variables_global.getnivelusu() < 3) || (variables_global.getnivelusu() == 7)){
            supervision_rh_edita fsrhe=new supervision_rh_edita(Integer.valueOf(this.jftf_asist_idemplea.getText()),1);
            fsrhe.pack();
            fsrhe.setVisible(true);
        }
}//GEN-LAST:event_jbtn_detalleempleadoActionPerformed

    private void jbtn_asist_guardarcambiosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_asist_guardarcambiosActionPerformed
        // TODO add your handling code here:
        switch (opcionupdate) {
            case 1:
                if(JOptionPane.showConfirmDialog(null, "<html><b>Estan Correctos Sus Datos?<br>"+this.jtf_empleadoactualnombre.getText()+"<br>"+this.jtf_asis_fechaasis.getText()+"</b></html>")==0) {
                    String arreglo_statusasis[]=this.jcmbx_asist_status.getSelectedItem().toString().split(":");
                    this.asistencia_actualiza(controlcambio, this.jftf_asist_id.getText(), this.jftf_asist_idemplea.getText(), this.jtf_asist_boservaciones.getText(),"0",this.jftf_asist_horaentrada.getText()+":00",this.jftf_asist_horasalida.getText()+":00",arreglo_statusasis[0], "","","",this.jtf_asist_horaent_pro.getText()+":00",this.jftf_asist_salidaprog.getText()+":00",this.jtf_asist_horaen_dcom.getText()+":00",this.jtf_asist_horasa_dcom.getText()+":00",this.jtf_minutoscomida.getText(),this.fechaamericana(this.jdc_fechanomina.getDate()),"");
                    this.jt_historialasistencia.requestFocus();
                    //this.jt_historialasistencia.changeSelection(0, 0, true, false);
                    this.jftf_asist_id.setText("");
                    this.jtf_asis_fechaasis.setText("");
                    this.jcmbx_asist_status.removeAllItems();
                    this.jftf_asist_horaentrada.setText("00:00:00");
                    this.jftf_asist_horasalida.setText("00:00:00");
                    this.jtf_asist_boservaciones.setText("");
                }
                break;
            case 2:
                if(JOptionPane.showConfirmDialog(null, "<html><b>Desea Crear Asistencia?<br>"+this.jtf_empleadoactualnombre.getText()+"<br>"+this.jtf_asis_fechaasis.getText()+"</b></html>")==0) {
                    String arreglo_statusasis[]=this.jcmbx_asist_status.getSelectedItem().toString().split(":");
                    this.asistencia_actualiza(5, this.jftf_asist_id.getText(), this.jftf_asist_idemplea.getText(), this.jtf_asist_boservaciones.getText(),this.jftf_asist_iddepa.getText(),this.jftf_asist_horaentrada.getText(),this.jftf_asist_horasalida.getText(),arreglo_statusasis[0], this.fechaamericana(this.jtf_asis_fechaasis.getText().substring(0, 10)),"","",this.jtf_asist_horaent_pro.getText(),this.jftf_asist_salidaprog.getText(),this.jtf_asist_horaen_dcom.getText(),this.jtf_asist_horasa_dcom.getText(),this.jtf_minutoscomida.getText(),this.fechaamericana(this.jdc_fechanomina.getDate()),"");
                    this.jt_historialasistencia.requestFocus();
                    //this.jt_historialasistencia.changeSelection(0, 0, true, false);
                    this.jftf_asist_id.setText("");
                    this.jtf_asis_fechaasis.setText("");
                    this.jcmbx_asist_status.removeAllItems();
                    this.jftf_asist_horaentrada.setText("00:00:00");
                    this.jftf_asist_horasalida.setText("00:00:00");
                    this.jtf_asist_boservaciones.setText("");
                }
                break;
        }
}//GEN-LAST:event_jbtn_asist_guardarcambiosActionPerformed

    private void jbtn_asistenciarevActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_asistenciarevActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Marcar Como Revisado?")==0) {
            String arreglo_statusasis[]=this.jcmbx_asist_status.getSelectedItem().toString().split(":");
            this.asistencia_actualiza(2, this.jftf_asist_id.getText(), this.jftf_asist_idemplea.getText(), this.jtf_asist_boservaciones.getText(),"0",this.jftf_asist_horaentrada.getText(),this.jftf_asist_horasalida.getText(),arreglo_statusasis[0], "","","",this.jtf_asist_horaent_pro.getText(),this.jftf_asist_salidaprog.getText(),this.jtf_asist_horaen_dcom.getText(),this.jtf_asist_horasa_dcom.getText(),this.jtf_minutoscomida.getText(),this.fechaamericana(this.jdc_fechanomina.getDate()),"");
            this.jt_historialasistencia.requestFocus();
            //this.jt_historialasistencia.changeSelection(0, 0, true, false);
            this.jftf_asist_id.setText("");
            this.jtf_asis_fechaasis.setText("");
            this.jcmbx_asist_status.removeAllItems();
            this.jftf_asist_horaentrada.setText("00:00:00");
            this.jftf_asist_horasalida.setText("00:00:00");
            this.jtf_asist_boservaciones.setText("");
        }
}//GEN-LAST:event_jbtn_asistenciarevActionPerformed

    private void jftf_asist_horasalidaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_asist_horasalidaActionPerformed
        // TODO add your handling code here:
        this.jtf_asist_boservaciones.requestFocus();
}//GEN-LAST:event_jftf_asist_horasalidaActionPerformed

    private void jftf_asist_horaentradaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_asist_horaentradaActionPerformed
        // TODO add your handling code here:
        this.jftf_asist_horasalida.requestFocus();
}//GEN-LAST:event_jftf_asist_horaentradaActionPerformed

    private void jcmbx_asist_statusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_asist_statusActionPerformed
        // TODO add your handling code here:
        this.jtf_asist_horaent_pro.selectAll();
        this.jtf_asist_horaent_pro.requestFocus();
}//GEN-LAST:event_jcmbx_asist_statusActionPerformed

    private void jt_detalleprenomina1PropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jt_detalleprenomina1PropertyChange
        // TODO add your handling code here:
}//GEN-LAST:event_jt_detalleprenomina1PropertyChange

    private void jt_detalleprenomina2PropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jt_detalleprenomina2PropertyChange
        // TODO add your handling code here:
    }//GEN-LAST:event_jt_detalleprenomina2PropertyChange

    private void jcmbx_idpatronclasif1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_idpatronclasif1ActionPerformed
        // TODO add your handling code here:
        if(comboa>0)
        {
               
                    String arreglo_pa[]=this.jcmbx_idpatronclasif1.getSelectedItem().toString().split(":");

                    if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Desea Aplicar Filtro para Area:<br>"+arreglo_pa[1]+"?</b></h2><html>")==0)
                        {
                        this.carga_datos_empleado_x_patrondetalle1nof(20, this.jtf_idpat1.getText(), this.jtf_idperactua.getText(),arreglo_pa[0]);
                        this.carga_datos_empleado_x_patron_movdetnof1(6, this.jtf_idpat1.getText(), this.jtf_idperactua.getText());

                         this.carga_datos_empleado_x_patrondetalle2(21, this.jtf_idpat1.getText(), this.jtf_idperactua.getText(),arreglo_pa[0]);
                        this.carga_datos_empleado_x_patron_movdet2(6, this.jtf_idpat1.getText(), this.jtf_idperactua.getText());

                        }
        }
    }//GEN-LAST:event_jcmbx_idpatronclasif1ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        // TODO add your handling code here:
       float filas = this.jtable_modelo_reportef2.getRowCount() ;
        float paginas = filas /25;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimirf(ni,paginas);
             }
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo_reportef.getRowCount() ;
        float paginas = filas /25;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimir(ni,paginas);
             }

    }//GEN-LAST:event_jButton6ActionPerformed

    private void jtf_fechainiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_fechainiActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_fechainiActionPerformed

    private void jtf_fechafinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_fechafinActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_fechafinActionPerformed

    private void jrbtn_ordenmrmActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_ordenmrmActionPerformed
        // TODO add your handling code here:
       ordenpun=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_ordenmrmActionPerformed

    private void jrbtn_ordendepaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_ordendepaActionPerformed
        // TODO add your handling code here:
        ordenpun=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_ordendepaActionPerformed

    private void jbtn_imprimirpuntualiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imprimirpuntualiActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo_empleado.getRowCount() ;
        float paginas = filas /40;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimir_puntual(ni, paginas);
             }
    }//GEN-LAST:event_jbtn_imprimirpuntualiActionPerformed

    private void jftf_asist_horaentrada1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_asist_horaentrada1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jftf_asist_horaentrada1ActionPerformed

    private void jftf_asist_horaentrada2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_asist_horaentrada2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jftf_asist_horaentrada2ActionPerformed

    private void jtf_minutoscomida1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_minutoscomida1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_minutoscomida1ActionPerformed

    private void jftf_he_autorizadaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_he_autorizadaActionPerformed
        // TODO add your handling code here:
        this.jtf_asist_boservaciones1.selectAll();
        this.jtf_asist_boservaciones1.requestFocus();
}//GEN-LAST:event_jftf_he_autorizadaActionPerformed

    private void jtf_asist_boservaciones1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_asist_boservaciones1ActionPerformed
        // TODO add your handling code here:
        this.jbtn_guardarheActionPerformed(evt);
    }//GEN-LAST:event_jtf_asist_boservaciones1ActionPerformed

    private void jtf_asist_boservaciones1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtf_asist_boservaciones1FocusLost
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_asist_boservaciones1FocusLost

    private void jbtn_guardarheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_guardarheActionPerformed
        // TODO add your handling code here:
        int folio=0;
        float horas=0;
       DecimalFormat myFormat = new DecimalFormat("############.##");
    if(this.jtf_asist_boservaciones1.getText().length()>0)
        {
            if((Integer.valueOf(this.jftf_heempleado.getText())>0) &&(Integer.valueOf(this.jftf_he_tipohe.getText())>0))
                {
                    String tipohe="";
                    switch (Integer.valueOf(this.jftf_he_tipohe.getText()))
                        {
                            case 1:
                                   tipohe="PREVIO APER. AREA";
                            break;
                            case 2:
                                   tipohe="TIEMPO COMIDA SUPRIMIDA";
                            break;
                            case 3:
                                   tipohe="EXTENSION JORNADA";
                            break;
                            case 4:
                                   tipohe="GENERAL";
                            break;
                        }
                    if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Estan Correctos Sus Datos?<br>"+this.jtf_empleadoactualnombre.getText()+"<br>"+this.jtf_asis_fechaasis1.getText()+"<br>Tipo H.E.:"+tipohe+"<br>Horas Extras:"+this.jftf_he_autorizada.getText()+"</b></h2></html>")==0)
                        {
                            String texto="select * from x1_supervision_empleados_asistencia_ins_hexdia(1,'"+this.jftf_heempleado.getText()+"','"+this.jtf_asist_boservaciones1.getText()+"','"+this.jftf_he_tipohe.getText()+"','"+this.fechaamericana(this.jtf_asis_fechaasis1.getText())+"','0','"+this.jftf_he_autorizada.getText()+"','','','','')";

                                            System.out.println(texto);
                                                try
                                                {
                                                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                                                while (rs.next())
                                                    {
                                                        folio=rs.getInt(1);
                                                    }
                                                }
                                                catch(Exception e)
                                                    {
                                                        System.out.println(e.getMessage());
                                                    }
                                            if(folio==1)
                                                {
                                                    jtable_modelo_he_detalle.setValueAt(this.jtf_asist_boservaciones1.getText(),Integer.valueOf(this.jftf_he_fila.getText()),2);
                                                    jtable_modelo_he_detalle.setValueAt(this.jftf_he_autorizada.getText(),Integer.valueOf(this.jftf_he_fila.getText()),4);
                                                     for(int i = 0 ;i < this.jtable_modelo_he_detalle.getRowCount(); i++)
                                                            {
                                                                horas+=Float.valueOf(this.jtable_modelo_he_detalle.getValueAt(i, 4).toString());
                                                            }
                                                            jtable_modelo_asistenciaxdiahe.setValueAt(myFormat.format(horas),Integer.valueOf(this.jftf_he_totfila.getText()),Integer.valueOf(this.jftf_he_totcolu.getText()));
                                                }
                        }
                    }
                    else
                        {
                            JOptionPane.showMessageDialog(null,"<html><h2><b>Elija un tipo de Hora hextra</b></h2></html>");
                        }
        }
        else
            {
                JOptionPane.showMessageDialog(null,"<html><h2><b>Por favor Ingrese Justificacion si Aprueba o razon de no Aprobacion</b></h2></html>");
                this.jtf_asist_boservaciones1.selectAll();
                this.jtf_asist_boservaciones1.requestFocus();
            }
}//GEN-LAST:event_jbtn_guardarheActionPerformed

    private void jftf_he_tipoheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_he_tipoheActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jftf_he_tipoheActionPerformed

    private void jftf_heempleadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_heempleadoActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jftf_heempleadoActionPerformed

    private void jftf_he_filaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_he_filaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jftf_he_filaActionPerformed

    private void jftf_he_totcoluActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_he_totcoluActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jftf_he_totcoluActionPerformed

    private void jftf_he_totfilaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_he_totfilaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jftf_he_totfilaActionPerformed

    private void jftf_asist_horaentrada3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_asist_horaentrada3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jftf_asist_horaentrada3ActionPerformed

    private void jftf_asist_horasalida1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_asist_horasalida1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jftf_asist_horasalida1ActionPerformed

    private void jtf_minutoscomida2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_minutoscomida2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_minutoscomida2ActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
      float filas = this.jtable_modelo_asistenciaxdiahe.getRowCount() ;
        float paginas = filas /40;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimir_he(ni, paginas);
             }
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jcmbx_interlineadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_interlineadoActionPerformed
        // TODO add your handling code here:
        //  this.jbtn_guardacambios.requestFocus();
}//GEN-LAST:event_jcmbx_interlineadoActionPerformed

    private void jtf_buscarenjtable1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_buscarenjtable1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_buscarenjtable1ActionPerformed

    private void jckb_noeliminar2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jckb_noeliminar2ActionPerformed
        // TODO add your handling code here:
        hedet=1;
        this.carga_datos_hepordiamov(27, "0",this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));

    }//GEN-LAST:event_jckb_noeliminar2ActionPerformed

    private void jmni_exportarheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_exportarheActionPerformed
        // TODO add your handling code here:
        this.exportar_archivo();
}//GEN-LAST:event_jmni_exportarheActionPerformed

    private void jbtn_eventosacActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_eventosacActionPerformed
        // TODO add your handling code here:
        this.carga_datos_eventoshis(2,"","","");
        
}//GEN-LAST:event_jbtn_eventosacActionPerformed

    private void jmni_eventosaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_eventosaActionPerformed
        // TODO add your handling code here:
        this.jbtn_eventosacActionPerformed(evt);
    }//GEN-LAST:event_jmni_eventosaActionPerformed

    private void jTabbedPane2StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane2StateChanged
        // TODO add your handling code here:
    indice=this.jTabbedPane2.getSelectedIndex();
         if(carga>0)
                    {
            switch(indice)
                {
                case 0:
                    //this.jpsw_codigo.requestFocus();
                break;
               case 1:
                    //this.cargar_datos_checklocales();
                break;
                case 2:
                    //this.jtf_busqueda.requestFocus();
                break;
                case 3:
                     this.carga_datos_eventoshis(2,"","","");
                     this.carga_datos_empleadoeve(0,"");
                    //x.estableceConexion();
                    //this.iniciar_modelo_depaenlistac();
                    //x.cierraConexionv2(si_variables.getconexiongral());
                break;
                case 4:
                    //this.jtf_evobs.selectAll();
                    //this.jtf_evobs.requestFocus();
                break;

            }
        }
    }//GEN-LAST:event_jTabbedPane2StateChanged

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
 if(JOptionPane.showConfirmDialog(null, "Desea Generar Reporte?")==0)
        {
                     this.carga_datos_eventoshis(3,this.fechaamericana(this.jdc_fechainicial1.getDate()),this.fechaamericana(this.jdc_fechafinal1.getDate()),"");
        }

    }//GEN-LAST:event_jButton1ActionPerformed

    private void jckb_verhrstrabActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jckb_verhrstrabActionPerformed
        // TODO add your handling code here:
        this.jckb_verhrstrab1.setSelected(false);
}//GEN-LAST:event_jckb_verhrstrabActionPerformed

    private void jbtn_asist_guardarcambios1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_asist_guardarcambios1ActionPerformed
        // TODO add your handling code here:
         if(JOptionPane.showConfirmDialog(null, "Desea Cerrar el Dia?")==0)
        {
            String texto="select * from x1_supervision_empleados_asistencia_cerrardia('"+this.jftf_asist_idemplea.getText()+"',0,'0',1,'"+this.fechaamericana(this.jtf_asis_fechaasis.getText().substring(0,10))+"','"+this.jftf_asist_horasalida.getText()+"');",tiempo[]=null;
            int folio=0;
            System.out.println(texto);
            try
                {
                    rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next())
                        {
                            folio=rs.getInt(1);
                        }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }
     }
    }//GEN-LAST:event_jbtn_asist_guardarcambios1ActionPerformed

    private void jckb_verhrstrab1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jckb_verhrstrab1ActionPerformed
        // TODO add your handling code here:
        this.jckb_verhrstrab.setSelected(false);

    }//GEN-LAST:event_jckb_verhrstrab1ActionPerformed

    private void jmni_repasisheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_repasisheActionPerformed
        // TODO add your handling code here:
        if(this.jckb_verhrstrab1.isSelected())
            {
                float filas = this.jtable_modelo_asistenciaxdia.getRowCount() ;
                float paginas = filas /Float.valueOf(this.jtf_asilinxhoja.getText().toString());
                System.out.println(paginas+" en pocicion ");
                int ni=0;
                for(ni=0;ni<paginas;ni++)
                    {
                        this.imprimir_heasistencia(ni, paginas);
                    }
            }
    }//GEN-LAST:event_jmni_repasisheActionPerformed

    private void jbtn_busqudainsiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_busqudainsiActionPerformed
        // TODO add your handling code here:
        if(this.jtf_insidenciabusqueda.toString().length()>0)
            {
                this.carga_datos_empleadoeve(2,this.jtf_insidenciabusqueda.getText().trim().toUpperCase());
            }
    }//GEN-LAST:event_jbtn_busqudainsiActionPerformed

    private void jtf_insidenciabusquedaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_insidenciabusquedaActionPerformed
        // TODO add your handling code here:
        this.jbtn_busqudainsiActionPerformed(evt);
    }//GEN-LAST:event_jtf_insidenciabusquedaActionPerformed

    private void jcmbx_asist_status1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_asist_status1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jcmbx_asist_status1ActionPerformed

    private void jbtn_busqudainsi1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_busqudainsi1ActionPerformed
        // TODO add your handling code here:
          int folio=0;
         if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Estan Correctos Sus Datos?<br>"+this.jtf_empleadoactualnombre2.getText()+"<br>Fecha Inicio"+this.fechaeuropea(this.jdc_fechainicial2.getDate())+" A "+this.fechaeuropea(this.jdc_fechafinal2.getDate())+"<br>Concepto:"+this.jcmbx_asist_status1.getSelectedItem().toString()+"</b></h2></html>")==0)
                {
                    String idt[]=this.jcmbx_asist_status1.getSelectedItem().toString().split(":");
                    String texto="select * from x1_supervision_empleados_asistencia_insidencias(1,'"+this.jftf_asist_idemplea1.getText()+"','"+this.jtf_insidenciabusqueda1.getText().toUpperCase()+"','"+idt[0]+"','"+this.fechaamericana(this.jdc_fechainicial3.getDate())+"','"+this.jtf_insidenciabusqueda2.getText().toUpperCase()+"','"+this.fechaamericana(this.jdc_fechainicial2.getDate())+"','"+this.fechaamericana(this.jdc_fechafinal2.getDate())+"','"+variables_global.getId_empleado()+"','"+this.jftf_asist_idemplea2.getText()+"','')";

                                            System.out.println(texto);
                                                try
                                                {
                                                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                                                while (rs.next())
                                                    {
                                                        folio=rs.getInt(1);
                                                    }
                                                }
                                                catch(Exception e)
                                                    {
                                                        System.out.println(e.getMessage());
                                                    }
                                            if(folio==1)
                                                {
                                                    JOptionPane.showMessageDialog(null,"Incidencia creada correctamente");
                                                }
                }
    }//GEN-LAST:event_jbtn_busqudainsi1ActionPerformed

    private void jtf_insidenciabusqueda1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_insidenciabusqueda1ActionPerformed
        // TODO add your handling code here:
        this.jtf_insidenciabusqueda2.selectAll();
        this.jtf_insidenciabusqueda2.requestFocus();
    }//GEN-LAST:event_jtf_insidenciabusqueda1ActionPerformed

    private void jtf_insidenciabusqueda2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_insidenciabusqueda2ActionPerformed
        // TODO add your handling code here:
        this.jbtn_busqudainsi1ActionPerformed(evt);
    }//GEN-LAST:event_jtf_insidenciabusqueda2ActionPerformed
     private void jt_catempleados1MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jt_catempleadosMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }

    private void jt_historialasistencia_detalle1MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jt_historialasistencia1MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }

    private void jt_resumenxstatus1MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jt_periodosMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
        private void jt_detalleprenominaMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }  private void jt_historialasistenciaMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private String  fechaeuropea(Date fecha) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";

       cadenafecha= formateadorestaeuropa.format(fecha);
       return cadenafecha;

    }

    private String fechaamericana(Date fe) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("yyyy-MM-dd");
       String cadenafecha="";
       cadenafecha= formateadorestaeuropa.format(fe);
       return cadenafecha;

    }
    private String  fechaeuropea(String fecha) {

         //resibe cadena de fecha en formato americano yyyy-MM-dd
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }

 private String  fechaamericana(String fecha) {

         //resibe cadena de fecha en formato americano dd-MM-yyyy
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaamericano = new SimpleDateFormat("yyyy-MM-dd");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateador.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaamericano.format(fechaestaeuropa);
       return cadenafecha;

    }


 private int fechasDiferenciaEnDias(Date fechaInicial, Date fechaFinal) {

      Calendar grefechamesini = Calendar.getInstance(); // obtiene la fecha actual
       grefechamesini.set(fechaInicial.getYear()+1900,fechaInicial.getMonth(),fechaInicial.getDate());
      Calendar grefechamesfin = Calendar.getInstance(); // obtiene la fecha actual
      grefechamesfin.set(fechaFinal.getYear()+1900,fechaFinal.getMonth(),fechaFinal.getDate());

     int dias=grefechamesfin.get(Calendar.DAY_OF_YEAR)-grefechamesini.get(Calendar.DAY_OF_YEAR);
     /*
        DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM);
        String fechaInicioString = df.format(fechaInicial);
            try {
                fechaInicial = df.parse(fechaInicioString);
                }
                catch (ParseException ex) {
                }

        String fechaFinalString = df.format(fechaFinal);
                try {
                    fechaFinal = df.parse(fechaFinalString);
                    }
                catch (ParseException ex) {
                    }

            long fechaInicialMs = fechaInicial.getTime();
            long fechaFinalMs = fechaFinal.getTime();
            long diferencia = fechaFinalMs - fechaInicialMs;
            double dias = Math.floor(diferencia / (1000 * 60 * 60 * 24));
      */
            return dias;
    }

 private String mensajetiempo(int nd) {
     String mensaje="";
     if (nd==0)
				{
					mensaje=" Hoy ";
				}
		if (nd==1)
				{
					mensaje=" ayer ";
				}
		if (nd>1)
				{
					mensaje=" Hace " + nd + " Dias " ;
				}
 	return mensaje;
 }

 private String DiaSemana(String fe) {
      //recibe un la fecha en strin formato yyyy-MM-dd
       String dia = "";
       java.util.Date fecha=null;
       try{
             fecha = formateadoresta.parse(fe);
          }
        catch (ParseException e){
           //Error, la cadena de texto no se puede convertir en fecha.
          }
        Calendar cal= Calendar.getInstance();
        cal.setTime(fecha);

        //ojo para establecer o recetear cada parte de la fecha por separado
        //cal.set(Calendar.YEAR, fecha.getYear());
        //cal.set(Calendar.MONTH, fecha.getMonth());
        //cal.set(Calendar.DAY_OF_MONTH, fecha.getDay());
        int diaInt = cal.get(Calendar.DAY_OF_WEEK);
        switch (diaInt) {
            case 1:
                dia = "Domingo";
                break;
            case 2:
                dia = "Lunes";
                break;
            case 3:
                dia = "Martes";
                break;
            case 4:
                dia = "Miercoles";
                break;
            case 5:
                dia = "Jueves";
                break;
            case 6:
                dia = "Viernes";
                break;
            case 7:
                dia = "Sabado";
                break;
        }
        return dia;
    }
private void find_textoenjtable(int columna,int filainicio,String texto)
    {

       int totalfilasreporte=this.jtable_modelo.getRowCount(),i=0,encontro=0,coincidencias=0;
       String cadenaobtenida="";
         //genero los totales por tienda
       for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo.getValueAt(i, columna).toString();
                encontro=cadenaobtenida.indexOf(texto);
                if(encontro!=-1)
                    {
                        System.out.println(cadenaobtenida+" en pocicion "+i);
                        this.jtb_asitencia.changeSelection(i, 0, true, false);
                        encontro=-1;
                        coincidencias++;
                    }
            }
            this.jlb_resultado.setText("Resultado:"+this.jtf_buscarenjtable.getText()+"="+coincidencias);
    }
  private void jlst_clientesdistribucionMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
  private void jt_catprenominasMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new supervision_rh_asistencia_xdia().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane18;
    private javax.swing.JScrollPane jScrollPane19;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JButton jbtn_agregarprenomina;
    private javax.swing.JButton jbtn_asist_guardarcambios;
    private javax.swing.JButton jbtn_asist_guardarcambios1;
    private javax.swing.JButton jbtn_asistenciarev;
    private javax.swing.JButton jbtn_asistenciarev1;
    private javax.swing.JButton jbtn_busqudainsi;
    private javax.swing.JButton jbtn_busqudainsi1;
    private javax.swing.JButton jbtn_detalleempleado;
    private javax.swing.JButton jbtn_eventosac;
    private javax.swing.JButton jbtn_generareporte;
    private javax.swing.JButton jbtn_guardarhe;
    private javax.swing.JButton jbtn_imprimirpuntuali;
    private javax.swing.JCheckBox jckb_noeliminar;
    private javax.swing.JCheckBox jckb_noeliminar1;
    private javax.swing.JCheckBox jckb_noeliminar2;
    private javax.swing.JCheckBox jckb_verhrstrab;
    private javax.swing.JCheckBox jckb_verhrstrab1;
    private javax.swing.JComboBox jcmbx_asist_status;
    private javax.swing.JComboBox jcmbx_asist_status1;
    private javax.swing.JComboBox jcmbx_departamento;
    private javax.swing.JComboBox jcmbx_idpatronclasif1;
    private javax.swing.JComboBox jcmbx_interlineado;
    private com.toedter.calendar.JDateChooser jdc_fechafinal;
    private com.toedter.calendar.JDateChooser jdc_fechafinal1;
    private com.toedter.calendar.JDateChooser jdc_fechafinal2;
    private com.toedter.calendar.JDateChooser jdc_fechainicial;
    private com.toedter.calendar.JDateChooser jdc_fechainicial1;
    private com.toedter.calendar.JDateChooser jdc_fechainicial2;
    private com.toedter.calendar.JDateChooser jdc_fechainicial3;
    private com.toedter.calendar.JDateChooser jdc_fechanomina;
    private javax.swing.JFormattedTextField jftf_asist_horaentrada;
    private javax.swing.JFormattedTextField jftf_asist_horaentrada1;
    private javax.swing.JFormattedTextField jftf_asist_horaentrada2;
    private javax.swing.JFormattedTextField jftf_asist_horaentrada3;
    private javax.swing.JFormattedTextField jftf_asist_horasalida;
    private javax.swing.JFormattedTextField jftf_asist_horasalida1;
    private javax.swing.JFormattedTextField jftf_asist_id;
    private javax.swing.JFormattedTextField jftf_asist_iddepa;
    private javax.swing.JFormattedTextField jftf_asist_idemplea;
    private javax.swing.JTextField jftf_asist_idemplea1;
    private javax.swing.JTextField jftf_asist_idemplea2;
    private javax.swing.JFormattedTextField jftf_asist_salidaprog;
    private javax.swing.JFormattedTextField jftf_he_autorizada;
    private javax.swing.JFormattedTextField jftf_he_fila;
    private javax.swing.JFormattedTextField jftf_he_tipohe;
    private javax.swing.JFormattedTextField jftf_he_totcolu;
    private javax.swing.JFormattedTextField jftf_he_totfila;
    private javax.swing.JFormattedTextField jftf_heempleado;
    private javax.swing.JLabel jlb_resultado;
    private javax.swing.JLabel jlbl_describepuntualidad;
    private javax.swing.JLabel jlbl_describepuntualidad1;
    private javax.swing.JLabel jlbl_nrp;
    private javax.swing.JLabel jlbl_patron;
    private javax.swing.JLabel jlbl_patrondir;
    private javax.swing.JLabel jlbl_periodo;
    private javax.swing.JLabel jlbl_rfc;
    private javax.swing.JList jlst_clientesdistribucion;
    private javax.swing.JMenuItem jmni_eventosa;
    private javax.swing.JMenuItem jmni_exportarhe;
    private javax.swing.JMenuItem jmni_generareporte;
    private javax.swing.JMenuItem jmni_repasishe;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JRadioButton jrbtn_columnadepartamento;
    private javax.swing.JRadioButton jrbtn_empleado;
    private javax.swing.JRadioButton jrbtn_estasemana;
    private javax.swing.JRadioButton jrbtn_hoy;
    private javax.swing.JRadioButton jrbtn_ordendepa;
    private javax.swing.JRadioButton jrbtn_ordenmrm;
    private javax.swing.JRadioButton jrbtn_semanapasada;
    private javax.swing.JRadioButton jrbtn_semanaproxima;
    private javax.swing.JTable jt_catempleados;
    private javax.swing.JTable jt_catempleados1;
    private javax.swing.JTable jt_catempleados2;
    private javax.swing.JTable jt_catprenominas;
    private javax.swing.JTable jt_detalleprenomina;
    private javax.swing.JTable jt_detalleprenomina1;
    private javax.swing.JTable jt_detalleprenomina2;
    private javax.swing.JTable jt_hetiposcat;
    private javax.swing.JTable jt_historialasistencia;
    private javax.swing.JTable jt_historialasistencia1;
    private javax.swing.JTable jt_historialasistencia_detalle;
    private javax.swing.JTable jt_historialasistencia_detalle1;
    private javax.swing.JTable jt_historialasistencia_detalle3;
    private javax.swing.JTable jt_periodos;
    private javax.swing.JTable jt_resumenxstatus;
    private javax.swing.JTable jt_resumenxstatus1;
    private javax.swing.JTable jtb_asitencia;
    private javax.swing.JTextField jtf_asilinxhoja;
    private javax.swing.JTextField jtf_asis_fechaasis;
    private javax.swing.JTextField jtf_asis_fechaasis1;
    private javax.swing.JTextField jtf_asis_fechasalida;
    private javax.swing.JTextField jtf_asist_boservaciones;
    private javax.swing.JTextField jtf_asist_boservaciones1;
    private javax.swing.JFormattedTextField jtf_asist_horaen_dcom;
    private javax.swing.JFormattedTextField jtf_asist_horaent_pro;
    private javax.swing.JFormattedTextField jtf_asist_horasa_dcom;
    private javax.swing.JTextField jtf_buscarenjtable;
    private javax.swing.JTextField jtf_buscarenjtable1;
    private javax.swing.JTextField jtf_empleadoactualnombre;
    private javax.swing.JTextField jtf_empleadoactualnombre1;
    private javax.swing.JTextField jtf_empleadoactualnombre2;
    private javax.swing.JTextField jtf_empleadoactualnombre3;
    private javax.swing.JTextField jtf_empleadoactualnombre4;
    private javax.swing.JTextField jtf_fechafin;
    private javax.swing.JTextField jtf_fechaini;
    private javax.swing.JTextField jtf_hestatus;
    private javax.swing.JTextField jtf_horastrabajadas;
    private javax.swing.JTextField jtf_horastrabajadas1;
    private javax.swing.JTextField jtf_idpat;
    private javax.swing.JTextField jtf_idpat1;
    private javax.swing.JTextField jtf_idperactua;
    private javax.swing.JTextField jtf_idtar;
    private javax.swing.JTextField jtf_insidenciabusqueda;
    private javax.swing.JTextField jtf_insidenciabusqueda1;
    private javax.swing.JTextField jtf_insidenciabusqueda2;
    private javax.swing.JTextField jtf_margen;
    private javax.swing.JTextField jtf_margen1;
    private javax.swing.JTextField jtf_minutoscomida;
    private javax.swing.JTextField jtf_minutoscomida1;
    private javax.swing.JTextField jtf_minutoscomida2;
    private javax.swing.JTextField jtf_periododescribe;
    private javax.swing.JTextField jtf_prenominaactual;
    private javax.swing.JTextField jtf_tareaobs;
    private javax.swing.JTextField jtf_tiendaactual;
    // End of variables declaration//GEN-END:variables
   private supervision_rh_imprimir objimpresora;
   private supervision_rh_asistencia_xdia_imp objimpresora2;
}
